how to manage an indented file with dom.

YGUEL

Usenet Archive
Joined
Feb 16, 2004
Messages
2
Reaction score
0
I try to parse an indented xml file with dom xerces c++. the file is like that :
<root>
<child1>
<field1> blabla </field1>
<field2> blibli </field2>
</child1>
<child2>
<field1> blabla </field1>
<field2> blibli </field2>
</child2>
</root>

where return an white spaces ar in the xml file. So the program I writed with dom give me this tree root has five childs :
text-node child1 text-node child2 text-node

the text of the first text-node is "\n "
the text of the second text-node is "\n "
the text of the third text-node is "\n"

this space fact occurs at each step in the tree hierarchy.
My questions are : is it possible to strip these node automatically ? Are text-node, which are a mixed soap of text and nodes, part of the standard xml ?

Thanks
 

Manuel Yguel

Usenet Archive
Joined
Feb 17, 2004
Messages
6
Reaction score
0
the problem doesn't occure with the qt parser so I think it is possible with xerces but how ?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
548,208
Messages
3,104,799
Members
249,594
Latest member
henrywalsh

Latest Threads

Top