No, I'm just saying that its giving you the position at the byte past the
content it just sent you. So, if you want to get all of the source bytes for
the event it just sent you, you'd need the last ending point it sent you for
the previous event. So the source bytes for the current event are the bytes
from the previous end point you got (which is now the first byte of the
element it just sent you, up to the new end point it just sent you (which is
the first byte of the next thing it will parse) minus one.

--------------------------
Dean Roddey
The Charmed Quark Controller
Charmed Quark Software
[EMAIL PROTECTED]
http://www.charmedquark.com

"If it don't have a control port, don't buy it!"


----- Original Message -----
From: "Jason E. Stewart" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, April 24, 2002 2:45 PM
Subject: Re: how to access the raw text that generated a sax event


> "Dean Roddey" <[EMAIL PROTECTED]> writes:
>
> > Keep in mind that its getting you the offset just past the *end* of
> > the thing it just handed you. So you have to keep a previous offset
> > around in order to get the data from there to the new end minus one
> > byte, which will get you the content of the thing it just handed
> > you.
>
> Hey Dean,
>
> Maybe I'm not understanding you. Are you saying that getSrcOffset() is
> returning the difference in bytes from the previous time it was
> invoked?
>
> If so, that's not the behavior that I'm observing:
>
>   Found element contributors at 70 offset
>   Found element person at 96 offset
>   Found element name at 107 offset
>   Found element email at 136 offset
>   Found element person at 201 offset
>   Found element name at 212 offset
>   Found element email at 241 offset
>   Found element person at 310 offset
>   Found element name at 321 offset
>   Found element email at 357 offset
>
> For me I'm getting the offset from the beginning of the file or
> buffer. I'm only looking at small files, so maybe this is only a
> single bufferful and that's why it works this way??
>
> Thanks,
> jas.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>


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

Reply via email to