You are viewing a plain text version of this content. The canonical link for it is here.
Posted to c-dev@xerces.apache.org by BenoƮt Desmeules <bd...@eurekium.com> on 2001/08/14 17:52:31 UTC
Problem understanding characters() callback in SAX2 parser
I don't fully know the internals of Xerces so maybe my problem is caused by
a misunderstanding. Although, I'd need some advice about something.
I'm using SAX2 to parse an XML file and retrieve its content. It's been
running fine for a while until someone used < and > codes in the XML
file. When there are such codes in an XML tag, the
DefaultHandler::characters() callback gets called a few times (each time it
encounters a < or > code).
For example, if I had <foo>bar is < than bla</foo> in my XML file, my
characters gets called twice :
first time with "bar is " and the second time with "< than bla".
Is there a way to only get one call to characters or do I have to
concatenate the contents?
Thanks in advance for the response.
Ben
---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-c-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-c-dev-help@xml.apache.org