OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: SAX question




>
> I think the main trouble you will have using the SAX approach is that the
> locator
> will not have the value you require to build an index.  According to the
SAX
> spcification
> "If possible, the SAX driver should provide the line position of the first
> character
> after the text associated with the document event"
>
> So, for example, for a startElement() event the locator is likely to point
> at the first character
> of element content - rather than the first character of the element start
> tag.  If you are planning
> on using this index position to later parse the fragment you will
obviously
> need the
> position at the start of the tag.

Yup.  That was the plan.    So, is this a roll-your-own parser adventure I'm
on then?  I'm looking at expat right now, which does give one a byte offset
into the file, but I'm not certain exactly which part of the element the
offset points to.  Any experience with it?

> > (and if it is written in c++ that makes my life MUCH easier)
> Oh good, somebody else using my favorite language!

:-)

Thanks for the help, by the way!

Judi Thomson