Re: [xml] Access Violation



On Mon, Jul 28, 2003 at 03:15:09PM +0100, Vincent Finn wrote:
There are 100,000 E nodes 
Is there a limit on the number of children a node can have?

  no

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?

  accessing ->content without checking the type of the node first
is 100% wrong. You're making assumption which is very likely to be false.

Daniel

-- 
Daniel Veillard      | Red Hat Network https://rhn.redhat.com/
veillard redhat com  | libxml GNOME XML XSLT toolkit  http://xmlsoft.org/
http://veillard.com/ | Rpmfind RPM search engine http://rpmfind.net/



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