[XML-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: SAX question

  • From: Judi Thomson <judi.thomson@g...>
  • To: Rob Lugt <roblugt@e...>, xml-dev@l...
  • Date: Thu, 15 Feb 2001 07:04:47 -0800

judi uml

>
> 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




PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
 

Stylus Studio has published XML-DEV in RSS and ATOM formats, enabling users to easily subcribe to the list from their preferred news reader application.


Stylus Studio Sponsored Links are added links designed to provide related and additional information to the visitors of this website. they were not included by the author in the initial post. To view the content without the Sponsor Links please click here.

Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.