about author

Previous | Next Entry

September 20, 2002

alek blogs

insane blabbering without spelling (*)

streaming and incremental building of XML node tree

How to combine best of SAX and DOM when working on SOAP

motivation DOM API (or one of its alternatives) is easier to use for document/literal encoding but streaming is essential for good performance ...

solution: two different modes of operation

  • when constructing node tree (streaming)
  • walking already constructed node tree

one goal: have uniform API for both cases (stream is parsed as much as needed to walk tree)

second goal: expose enough information in API so app can control tree creation skipping parts of it or using XmlPullParser directly (no tree nodes created) parts of tree can be detached for later GC

handling fragments transparently add all ancestro namespace-prefix declarations

        XmlPullNode
                isFinished()
                finishParsing()
                XmlPullParser asPullParser
                XmlPullNodeWalker asNodeWalker
        XmlPullNodeWalker
                Object nextNode(),
                Object nextNodeChild(),
                String nextNodeText(),
                XmlPullNode nextNodeTag()
                XmlPullParser asPullParser();

DOM working as front partial tree - mirrors what is in XmlPullNode however operations directly on XmlPullNode are _not_ mirrored to DOM!!!

Possibly related: PullDOM http://www.prescod.net/python/pulldom.html



This blog is about:
XML, Java, and everything else (or nothing ..)

Find more about
blog author

Blogroll:
Sam Ruby
Russell Beattie
Diego Doval
Joel on Software
and some (almost) harmless entertainment: The BileBlog

Projects::
MicroLogger
Xydra
WSIF
XmlPull API
XPP3/MXP1
XSOAP
XMessages

RSS RSS 0.92
0.92 [validate]
2.0 [validate]

Filter Entries:
Life Category Specific RSS Feed
Java Category Specific RSS Feed
XML Category Specific RSS Feed
Computing Category Specific RSS Feed
Web Services Category Specific RSS Feed


Valid XHTML 1.0!


Powered by microBlog (C) Aleksander Slominski

Disclaimer: personal opinions and observations that may or may not be taken seriously, or even based on shared reality and generally are very unreliable and personal and snapshots of volatile writer mind ...

NOTE: THIS PAGE IS UNDER CONSTANT DEVELOPEMENT