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
#2 and #3. Use the parser options:

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 Veillard      | Red Hat Desktop team
veillard redhat com  | libxml GNOME XML XSLT toolkit | Rpmfind RPM search engine

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