xml-general mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "HERRICK, CHUCK (SBCSI)" <CH6...@momail.sbc.com>
Subject RE: Xerces 1.0.2 DOMParser, whitespace and #text elements
Date Wed, 08 Mar 2000 22:47:31 GMT
I have validation turned on.
Whitespace #text elements are being
created, even though I have a DTD
and have set the parser to ignore
whitespace, both with the explicit
function and with the "features"

-----Original Message-----
From: Calvin Gaisford [mailto:calvin@calderasystems.com]
Sent: Wednesday, March 08, 2000 4:30 PM
To: general@xml.apache.org
Subject: Re: Xerces 1.0.2 DOMParser, whitespace and #text elements

I have seen the same thing but I just found this in the docs:

This method is used to report all the whitespace characters,
which are determined to be 'ignorable'. This distinction
between characters is only made, if validation is enabled.

If I understand that correctly, ignoring whitespace only
works if you have validation turned on.  right?


> Xerces-J 1.0.2 on NT in VisualAge for Java
> If you send setIncludeIgnorableWhitespace(false) to
> DOMParser, and then parse XML that has basically
> ELEMENT_NODEs, and a bit of whitespace between
> the start tags and end tags of the ELEMENT_NODEs,
> you get #text nodes that contain the white space
> (new line, tab, spaces, etc).
> What's up with that?

View raw message