The text may be whitespace, often used for
formatting for human readability. Unless you tell the parser what whitespace is
significant (via a DTD, for instance), it must retain it
all.
<outer>
<inner>
text
</inner>
</outer>
is not the same as
<outer><inner>text</inner></outer>
The former has a newline and some number of spaces at
the start of each element, which is represented as a text node, per the XML
specification.
That doesn't explain
the null value, however. Maybe I'm barking up the wrong
tree.
From: Sami Islam [mailto:[EMAIL PROTECTED]
Sent: Wednesday, January 26, 2005 7:54 AM
To: [EMAIL PROTECTED] Decisionsoft. Com; Xerces Dev List
Subject: Spam:XML Document parsing.Hello,
When I parse an Xerces XMLDoc using Pathan library I receive 2 nodes for each child node.
1) Text Node = "#text", even when there is no text for the element.
2) Element Node.And funnily I get the child value only if I do a (child_node)->getNodeValue() on the node of type Element and a null on the node of type Text. Why?
Regards,
Sami