[prev in list] [next in list] [prev in thread] [next in thread] 

List:       xom-interest
Subject:    Re: [XOM-interest] byte offsets
From:       Tatu Saloranta <cowtowncoder () yahoo ! com>
Date:       2006-04-25 21:41:02
Message-ID: 20060425214102.29808.qmail () web32812 ! mail ! mud ! yahoo ! com
[Download RAW message or body]

--- Elliotte Harold <elharo@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 mailing list
XOM-interest@lists.ibiblio.org
http://lists.ibiblio.org/mailman/listinfo/xom-interest
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic