Re: [xml] DTD validation & whitespace removal

On Feb 4, 2010, at 7:09 AM, Daniel Veillard wrote:

On Thu, Feb 04, 2010 at 08:53:42AM -0500, Piotr Sipika wrote:
Try parsing the document using:
xmlReadFile(URI, encoding, options)
with options set to XML_PARSE_NOBLANKS (in addition to anything else
you want to use)

 Honnestly, I think it's a bad advice in general. The blank nodes
used for "formatting" are an integral part of the XML document content
and users should rather learn XML and do the right thing than tweak the
parser to become non conformant.

Ah! Got your attention.  What is the "right thing" to do?  Specifically: the DTD contains information about 
where whitespace is significant; how is this information represented in the parsed tree? Duplicating the 
knowledge about where whitespace is significant seems fragile.


John Clements

Attachment: smime.p7s
Description: S/MIME cryptographic signature

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