The characters() callback doesn't guarantee you that the reported string
is the only text fragment; it could be forced to split it into several
calls.
As stated in
http://www.saxproject.org/apidoc/org/xml/sax/ContentHandler.html#characters%28char[],%20int,%20int%29
The Parser will call this method to report each chunk of character
data.
SAX parsers may return all contiguous character data in a single
chunk, or they may split it into several chunks;
however, all of the characters in any single event must come from
the same external entity so that the Locator provides useful information.
Alberto
On 2/24/2010 7:10 AM, YUAN,Hao wrote:
Hi,
When I use SAXParser to pase a xml element like:
\<a\>W/CEL\&\<\/a\>
It looks like that the parser split the whole string into two(W/CEL and
&) and without special string process I have to take one of them as the
tag's value. I wonder how does SAXParser process such special characters?
Maybe there's some thing wrong with my understanding and usage, hope so.
Thanks for your help!