SAX Parser includes ignorable whitespaces in the character() method

"Zhu, Joe" <[email protected]>
Newsgroups gmane.text.xml.xerces-j.user
Message-ID <[email protected]>
I am writing an app which need to access all text content in XML. According to the ContentHandler API, this could be accomplished by using a validating parser and the characters() method.

But with the Xerces parser, the characters() method could contain ignorable whitespaces (XML formatting whitespaces). I have no way to tell if the whitespace is ignorable whitespace or is part of the XML content.

Has anybody else run into the problem? I tested with both Xerces 2.9.1 and Xerces 2.11. They behave the same way.

Joe Zhu
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.