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

what lies between SAX and DOM ... [Re: parser models]

  • To: "xml-dev@l..." <xml-dev@l...>
  • Subject: what lies between SAX and DOM ... [Re: parser models]
  • From: Aleksander Slominski <aslom@c...>
  • Date: Tue, 24 Sep 2002 01:27:42 -0500

what lies between
John Cowan wrote:

> Simon St.Laurent scripsit:
>
> > My own MOE (http://moe.sourceforge.net) is an effort to blur the push
> > model and the tree-based model, since MOE objects can listen to the
> > events and build trees as desired. Perl and Python have libraries for
> > this as well.
>
> I have just proposed on the xom-interest list an XMLFilter called Shemp :-)
> which does the same general thing with SAX events and XOM trees.  During a
> startElement callback, Shemp's client can ask it to start creating a tree;
> all SAX events are then consumed until (but not including) the matching
> endElement callback, at which time the tree is available.

hi,

there are already such ultra lightweight XML trees. i have implemented
XmlPullNode which is incremental document object model essentially
blending streaming-and-forward-only (events)  and
represent-xml-in-memory (trees) approaches.

using XmlPullNode you can start accessing XML tree _before_ XML input
is fully available (as soon as you try to read anything that is not available
tree node is expanded by pulling more input). there are basically two
ways to use XmlPullNode: you can ignore that it is constructed on demand
and use it as any other "DOM" or you can actually access underlying xml
pull parser and read input directly (to avoid construction of node tree
for parts of input). parts of tree  that are no longer needed can be removed
and it helps to parse even huge inputs in small memory footprint.

XmlPullNode is part of XPP2 - a bit old and mostly deprecated
by XPP3 and  XmlPull API but it is still working just fine (and is well tested).

now i am working on on new version that will be part of XPP3
and will have more user friendly API:  XPP2 version is
efficient but is no toot good about forgiving or catching user errors ...

approaches like XmlPullNode have obvious advantages of
giving full navigation and still maintaining efficient resource
utilization but i still wonder if anything better than incremental
XML tree can be used that is between SAX and DOM: as easy
to navigate as DOM and as fast and low on memory as SAX ...

thanks,

alek



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.