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 Joe Marini <jo...@presidiosoftware.com> on 2001/11/02 01:49:47 UTC

Fw: Getting a node from raw offsets

Hello?

Anyone have any insights into this? Or know where I can get some more info
on it?

Thanks,

Joe

----- Original Message -----
From: "Joe Marini" <jo...@presidiosoftware.com>
To: <xe...@xml.apache.org>
Sent: Wednesday, October 31, 2001 9:28 AM
Subject: Getting a node from raw offsets


> Hey everyone,
>
> If all I have to work with is the root document node and two offsets into
> the raw text of the input document, how can I find out which node is
> represented by the two offsets?
>
> Thanks,
>
> Joe
>




---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-c-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-c-dev-help@xml.apache.org


RE: Getting a node from raw offsets

Posted by Erik Rydgren <er...@mandarinen.se>.
No you can not with the existing API's.
( If I am wrong, just bitch-slap me in public plz :) )

But maybe there is a way. If you create your own input source that keeps
track of the current column and row.
And combine it with a SAX parser that remembers the current node and when
the input source reads the wanted position
then the current node should be the one you requested. There are tons of
pitfalls in this solution but I might work.

Good luck.

/ Erik

-----Original Message-----
From: Joe Marini [mailto:joe@presidiosoftware.com]
Sent: den 2 november 2001 01:50
To: xerces-c-dev@xml.apache.org
Subject: Fw: Getting a node from raw offsets


Hello?

Anyone have any insights into this? Or know where I can get some more info
on it?

Thanks,

Joe

----- Original Message -----
From: "Joe Marini" <jo...@presidiosoftware.com>
To: <xe...@xml.apache.org>
Sent: Wednesday, October 31, 2001 9:28 AM
Subject: Getting a node from raw offsets


> Hey everyone,
>
> If all I have to work with is the root document node and two offsets into
> the raw text of the input document, how can I find out which node is
> represented by the two offsets?
>
> Thanks,
>
> Joe
>




---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-c-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-c-dev-help@xml.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-c-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-c-dev-help@xml.apache.org