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

Re: SAX question

  • From: Jeff Lansing <jeff@p...>
  • To: Judi Thomson <judi.thomson@g...>
  • Date: Fri, 09 Feb 2001 09:50:01 -0800

judi thomson
Judi,

Isn't this something you would want to do with XPath? Or perhaps I am misunderstanding your intention...perhaps your idea is to avoid parsing the file again (at the later date) and just do seeks to known offsets.

Jeff
 

Judi Thomson wrote:

I know that this question has been answered somewhere before, but I simply cannot seem to hunt down a definitive answer and all pointers lead back to this list.  So, I apologize in advance for the repetition. I'm relatively new to SAX, but not-quite-so-new to XML,DOM and XSLT.  My task is to take a large XML file with multiple occurences of a specific kind of element.  I need to build an index that lets me retrieve instances of that element from the file (at a later date) very quickly. My thought for this was to use the locator in a SAX parser to identify the location of the start of the element tag in the file, record that location persistently and then use the persistent location later on to get my element (and its contents) back quickly. My questions are: Is there a SAX implementation for which the locator is known to be accurate?  I noted somewhere (in the SAX specification?) that the locator is kind of intended for debugging more than document  manipulation.  (and if it is written in c++ that makes my life MUCH easier) Is there an easier way to do what I need to do?   For each file I look at the element-of-interest will change.  There may be multiple (and different) types of interesting elements in a single file.  I am working with static files that will not change once I process them. Any help greatly appreciated! Judi Thomson  

  • References:

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.