On 8/19/2012 5:37, rory wrote:
I use xmlPareFile function to read a xml file, then I print the root
node name, it works ok, but after excute currentnode =
currennode->children sentence, I re-print node , it display "text",
what's the reason for this issue, and how can I solve it.
See item #4 in the developer FAQ:
http://xmlsoft.org/FAQ.html#Developer
"In XML all characters in the content of the document are significant
including blanks and formatting line breaks.
The extra nodes you are wondering about are just that, text nodes with
the formatting spaces which are part of the document but that people
tend to forget. There is a function xmlKeepBlanksDefault () to remove
those at parse time, but that's an heuristic, and its use should be
limited to cases where you are certain there is no mixed-content in the
document."
Jason
_______________________________________________
xml mailing list, project page http://xmlsoft.org/
[email protected]
https://mail.gnome.org/mailman/listinfo/xml