[xml] 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:


  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


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


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]