Re: [xml] ignorable whitespace



On Wed, Apr 21, 2004 at 05:47:30PM +1000, Roger Reynolds wrote:

Please, somebody tell me that there is a way
to instruct xmlParseDocument to discard all "ignorable whitespace"
that may be present when it parses a document.

I'm using version 2.6.8, and not using SAX.

 Read the FAQ http://xmlsoft.org/FAQ.html#Developer
#2 and #3. Use the parser options:
  http://xmlsoft.org/html/libxml-parser.html#xmlParserOption
  http://xmlsoft.org/html/libxml-parser.html#xmlReadFile

It is *crucial* to me to be able to eliminate that noise
in order to manipulate the document tree structure in a sensible
and reliable way.

  Then you have a *crucial* problem with the way you code your
XML application. White space in content *are* *signifificant*, 
and *MUST* be reported to the application, it is written black on white
in the XML spec. So before jumping on hasty conclusions about toolkits
and the proper way to process XML data, I *STRONGLY* suggest you
take the time to read the spec associated to said data !
  For a start if you don't use a DTD and describe the elements content
the parser *cannot* even know what might be "ignorable whitespace".

Daniel

-- 
Daniel Veillard      | Red Hat Desktop team http://redhat.com/
veillard redhat com  | libxml GNOME XML XSLT toolkit  http://xmlsoft.org/
http://veillard.com/ | Rpmfind RPM search engine http://rpmfind.net/



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