logo       
Google Custom Search
    AddThis Social Bookmark Button
-->

Re: clarification about "empty" text nodes: msg#00162

Subject: Re: clarification about "empty" text nodes
Daniel Veillard wrote:

Function: xmlIsBlankNode
int xmlIsBlankNode (xmlNodePtr node)

Or am I misunderstanding something?


  That's the closest you can get. But basically, *any* text in element
content is significant. Only the application can tell if a TEXT_NODE
is significant or not:

<p>
   <b>important</b>
</p>

  There is no way to say that what may look like as formatting text
isn't part of the informations that the author expected to provide the
reader of the document. If you have a DTD content model you may be
able to guess it, but without it you just can't assume anything.
  The content of <p> is not empty, and you have no way to decide
unless you have other specific knowledge if this is equivalent to

<p><b>important</b></p>

Hehe, you sound afraid, in fear from that well-known, senseless debate about "ignorable whitespace". :-)

Ciao,
Igor


<Prev in Thread] Current Thread [Next in Thread>