× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



Hi Nathan

I believe that we don't tell the SAX parser where to go get the information - it goes from start to end of the XML "document" and returns to a call-out procedure with various events, like start of document, end of element, stuff like that.

You don't invoke the parser repetitively - at least, not the SAX parser in use with XML-SAX operation code.

A programmer has to know the structure ahead of time, in order to create reasonable sets of procedures to process each event type. And you need to keep track of where you are in the tree as the parser calls your procedure.

This IS a single pass - just lots of exits to the handling procedure you specify.

Hope that makes sense and is even close to reality!!

There are other parser - EXPAT is one.

Then there is the DOM model - the entire contents are read into a tree, basically - and beyond that I can say no more, even out of ignorance!!

Cheers
Vern

On 7/13/2017 10:52 AM, Nathan Andelin wrote:
That makes sense. But it underscores that the developer must know the
content of the XML document in order to instruct the parser on how to parse
it.

I should clarify, that the developer must provide instructions to the
parser about which portions of the document to parse - that the parser must
be invoked repetitively in order to extract the specific content needed -
and that repeated invoking of the parser is probably not as efficient as a
single pass would be.


As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:
Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.