You are viewing a plain text version of this content. The canonical link for it is here.
Posted to j-dev@xerces.apache.org by Nilesh Gokhale <ni...@fast.fujitsu.com.au> on 2001/06/08 05:53:07 UTC
Problem in the characters(char[], int, int) call
> 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?
>
> regards
>
> Nilesh
---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-j-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-j-dev-help@xml.apache.org
Re: Problem in the characters(char[], int, int) call
Posted by Elena Litani <el...@ca.ibm.com>.
Hi, Nilesh,
It is not a limitation. Read SAX documentation
(DocumentHandler.characters(char[], int, int):
"* <p>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.</p>
"
Elena
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?
> >
> > regards
> >
> > Nilesh
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: xerces-j-dev-unsubscribe@xml.apache.org
> For additional commands, e-mail: xerces-j-dev-help@xml.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-j-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-j-dev-help@xml.apache.org