Title: Nachricht
Hello,
I edited the .xml file using an editor and got rid of all the whitespace & newline chars. Now I have the correct values.
 
How can I tell the parser that I don't want whitespaces and newlines between my tags?
 
Thanks,
Sami
-----Ursprüngliche Nachricht-----
Von: Jesse Pelton [mailto:[EMAIL PROTECTED]
Gesendet: Mittwoch, 26. Januar 2005 14:20
An: xerces-c-dev@xml.apache.org; [EMAIL PROTECTED]
Betreff: RE: XML Document parsing.

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

Reply via email to