On Fri, 8 Jun 2001, Nilesh Gokhale wrote:

> Greetings,
> 
> I am using org.apache.xerces.parsers.SAXParser in my application. When =
> parsing some XML files, the characters(char[], int, int) call sometimes =
> breaks up the value.
> e.g. if there is a String "yellow" between <Element> and </Element>, in =
> the characters call you expect the entire String "yellow" to appear. But =
> in some XML files I am getting "yello" and then "w"
> 
> The values of the 3 params in character when this happens are ("yello", =
> 16379, 5) and ("w", 0, 1).
> 
> Does anyone know of any such limitations in the parser?

I wouldn't call it a limitation as such - the SAX spec states that a
parser need not return all the text in an element in a single call to
characters() to allow for implementation specific optimizations.  The
handler is responsible for collecting the characters together if that is
what is required.

Ian

-- 
Ian Roberts, Software Engineer        DecisionSoft Ltd.
Telephone: +44-1865-203192            http://www.decisionsoft.com




---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to