[xml] Re: Access Violation
- From: Vincent Finn <vincent finn automsoft com>
- To: xml gnome org
- Subject: [xml] Re: Access Violation
- Date: Mon, 28 Jul 2003 18:22:19 +0100
William M. Brack wrote:
As Daniel mentioned, it's a little difficult making guesses with a
code snippet, but you have gotten me a little confused. First,
could you confirm that the line
xmlNodePtr pValueText = pValue->children;
really should be
xmlNodePtr pValueText = pEvent->children;
or else give me a hint what pValue is pointing to.
sorry, missed that one
xmlNodePtr pValue = pEvent->children
In other words, pEvent will be pointing to the TEXT node, which is
the first child of firstChild, and not to the ELEMENT E which you
expect. This is what Daniel is talking about when he advises you to
check the node type.
If I have misunderstood, or if one of my assumptions is incorrect,
please clarify.
Regards,
Bill
Sorry, I obviously made this far more confusing than intended
I put the spaces in for readability in the mail
The real xml is on one line so it's very hard to read in plain text
i.e.
<root><firstChild><E><V>48471740</V><T>01c354fc14bb8030</T></E></firstChild></root>
so
pOperationElement is <firstChild>...</firstChild>
pEvent is <E>...</E>
pValue is <V>...</V>
pValueText is 48471740
Another thing which I didn't mention in the original mail is that the
code in the loop works perfectly for about 50,000 iterations before it
fails, that is why I asked if there was a limit (I'd have been surprised
if there was but had to be sure) and also why it looks like heap
corruption of some sort
Hopefully this makes a bit more sense.
I have tried to split the code out to something I could send but haven't
had any luck!
Vin
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]