From: Daniel Veillard (Daniel.Veillard@w3.org)
Date: Mon Sep 04 2000 - 18:08:05 EDT
On Mon, Sep 04, 2000 at 09:30:36PM +0200, Marc Billaud wrote:
> Between a parent node and child node I got a node called "text". This
> node called "text" can make pbs when you have to parse an imput XML file
> in which you don't know the name of the different nodes (eg: an XML
> editor).
In XML all spaces are significants. Including "formating spaces"
(carriage return, indentation ...) that's them.
> Is this a normal behavior? or do I forget something in my code to
> prevent this node text to appear?
xmlKeepBlanksDefault(0);
But don't complain if libxml "ate" blanks you considered significant.
If there was a decent rule to know whether a blank is significant or
not, the XML specification would have used that rule. 10+ years of
SGML tend to prove that no such rule exists ... Calling
xmlKeepBlanksDefault(0); you have to trust my algorithm :-)
Daniel
-- Daniel.Veillard@w3.org | W3C, INRIA Rhone-Alpes | Today's Bookmarks : Tel : +33 476 615 257 | 655, avenue de l'Europe | Linux XML libxml WWW Fax : +33 476 615 207 | 38330 Montbonnot FRANCE | Gnome rpm2html rpmfind http://www.w3.org/People/all#veillard%40w3.org | RPM badminton Kaffe ---- Message from the list xml@rpmfind.net Archived at : http://xmlsoft.org/messages/ to unsubscribe: echo "unsubscribe xml" | mail majordomo@rpmfind.net
This archive was generated by hypermail 2b29 : Mon Sep 04 2000 - 18:43:35 EDT