xom-interest AT lists.ibiblio.org
Subject: XOM API for Processing XML with Java
List archive
- From: Tatu Saloranta <cowtowncoder AT yahoo.com>
- To: xom-interest AT lists.ibiblio.org
- Subject: Re: [XOM-interest] byte offsets
- Date: Tue, 25 Apr 2006 14:41:02 -0700 (PDT)
--- Elliotte Harold <elharo AT metalab.unc.edu> wrote:
> Edward Summers wrote:
> > I was wondering if it is possible to determine
> byte offsets of
> > elements in a document when parsing with XOM. If
> there is a relevant
> > section of the documentation that deals with this,
> or a XOM recipe
> > for doing this sort of thing please let me know.
>
> No, it is not possible.
One thing to note is that the underlying parser (SAX
or StAX) might be able to provide these offsets. StAX
API theoretically exposes this information (although
exact type, char or byte offset, of offsets returned
is not clearly defined by the specs), but I am not
aware of an implementation that gives byte-accurate
offsets.
I do know that Woodstox StAX parser does report
character accurate offsets though (as long as you know
which location it refers to), and for some encodings
this is the same as byte offset.
-+ Tatu +-
__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com
-
[XOM-interest] byte offsets,
Edward Summers, 04/24/2006
- <Possible follow-up(s)>
- Re: [XOM-interest] byte offsets, Tatu Saloranta, 04/25/2006
Archive powered by MHonArc 2.6.24.