xml-general mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Thomas B. Passin" <tpas...@mitretek.org>
Subject Re: SAXParser and white space problem
Date Thu, 28 Jun 2001 19:05:55 GMT
[Irene Levina]

> If same data split into multiple lines, such as :
>     <Attribute>
>         <![CDATA[<greeting>Hello, world!</greeting>]]>
>     </Attribute>
> length parameter repoted just a whitespace, and I can't not get actual
> character data that I'm looking for. Is this bug was fixed in any new
> version of SAXParser?

That's because your data contains three nodes, not one
1) a whitespace-only node holding the first newline and it looks like some
spaces as well.
2) the expected CDATA node, and
3) another whitespace-only node holding the second newline.

It's not a bug, it reflects your data.  I'm not sure whether SAXParser has
settings to merge the whitespace-only nodes with the other nodes.  Otherwise
you have to make sure to collect all these nodes, not just the CDATA one.

Tom P

In case of troubles, e-mail:     webmaster@xml.apache.org
To unsubscribe, e-mail:          general-unsubscribe@xml.apache.org
For additional commands, e-mail: general-help@xml.apache.org

View raw message