Re: [xml] iterating through an XML document?
- From: Liam R E Quin <liam holoweb net>
- To: Torsten Mohr <tmohr s netic de>
- Cc: xml gnome org
- Subject: Re: [xml] iterating through an XML document?
- Date: Wed, 13 Jun 2007 21:13:56 -0400
On Thu, 2007-06-14 at 01:25 +0200, Torsten Mohr wrote:
But it seems that too many text nodes are output, also for nodes that
do not have any content there is a text node with some whitespace characters
Do you know why this could happen? How can i skip them?
<p><em>It's all</em> <b>exciting!</b></p>
and you'll see that the space between </em> and <b> is important.
If you write a DTD, you can have libxml discard space in "element
only context", i.e. where no text is allowed other than spaces.
But otherwise you'll get all the spaces.
This is a consequence of how XML works, and is not limited to
Liam Quin - XML Activity Lead, W3C, http://www.w3.org/People/Quin/
Pictures from old books: http://fromoldbooks.org/
Ankh: irc.sorcery.net irc.gnome.org www.advogato.org
] [Thread Prev