You are viewing a plain text version of this content. The canonical link for it is here.
Posted to c-users@xerces.apache.org by Yotam Ofek <se...@zahav.net.il> on 2005/06/10 16:56:58 UTC
Re: real basic SAX question
chris nuernberger wrote:
>Is there a way to get the current number from the sax2 parser? Either
>from the implementation of the DefaultHandler's beginElement or
>endElement callbacks or from the object that has access the the
>SAX2XMLReaderImpl object?
>
>Chris
>
>
>
I don't know if you've solved this already or not, but you can just
implement setDocumentLocator from ContentHandler, and set the Locator a
global variable.
Then in startElement or endElement you just query the Locator. Easy as that.
Re: real basic SAX question
Posted by chris nuernberger <cn...@gmail.com>.
I have, and I did it exactly the way you describe!
Thanks anyway, Chris
On 6/10/05, Yotam Ofek <se...@zahav.net.il> wrote:
> chris nuernberger wrote:
>
> >Is there a way to get the current number from the sax2 parser? Either
> >from the implementation of the DefaultHandler's beginElement or
> >endElement callbacks or from the object that has access the the
> >SAX2XMLReaderImpl object?
> >
> >Chris
> >
> >
> >
> I don't know if you've solved this already or not, but you can just
> implement setDocumentLocator from ContentHandler, and set the Locator a
> global variable.
> Then in startElement or endElement you just query the Locator. Easy as that.
>