[xml] Access Violation



Hi,

I am getting a crash using libXml so I wanted to verify I am using it
correctly

I am running WindowsXP using VC6 SP5 and using libXml2-2.5.8

The crash can't be debugged, it does happen in a debug build but it will 
keep working as long as I step through line by line once I let it run 
it will throw an exception (Access Violation) and when the exception happens
the call stack is gone !
(sounds like heap corruption)

What I am doing is parsing an XML file that has a structure as follows
<root>
        <firstChild>
                <E>...</E>
                ...
        </firstChild>
</root>

There are 100,000 E nodes 
Is there a limit on the number of children a node can have?

I am using it as follows
void fn(xmlNodePtr pOperationElement)
{
        xmlNodePtr pEvent = pOperationElement->children;
        while (pEvent != NULL)
        {
                xmlNodePtr pValueText = pValue->children;
                const char* bstrValueText = reinterpret_cast<char
const*>(pValueText->content);
                // etc...
                pEvent = pEvent->next;
        }
}

I assume since it looks like heap corruption that I am misusing the library
in some way
Is there anything here that looks wrong to anyone?



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]