Altova Mailing List Archives


RE: [xml-dev] SaxXPathFragmentFilter - Reduse large DOM trees using a SAX XPath cutter!

From: "Paul Brown" <prb@---------.--->
To: "Niels Peter Strandberg" <nielspeter@------------.--->
Date: 11/28/2001 7:02:00 PM
[Niels Peter Strandberg <mailto:nielspeter at npstrandberg.com>
> I have made an experimental SAX XMLFilter. It allows you to "filter" out
> the information in an xml document that you want to work with  - using
> xpath - and skip the rest. You can place the filter anywhere in your
> application where a XMLFilter can be used.
> - I don't know if this has already been done by others?

I wrote something like this a little while ago (optimistically named
SAXomata because it uses an FSA-like approach where SAX events are the
letters in an alphabet); it's on my list of partially finished projects.  As
you're describing, it uses a kind of bastardized XPath syntax, i.e., no
axes, limited qualifiers, ...  The net effect was nice:  a few milliseconds
to execute a set of non-node-valued XPath queries against a SAX parse versus
tens of milliseconds to execute a set of XPath queries in addition to
constructing a DOM from the SAX parse.

I haven't yet looked at the internals of what you're doing, but I don't
imagine that there are too many ways to go about it.  It does sound like
there is enough interest (and existing code out there) to come up with some
kind of developer-driven spec and create some tools.

	-- Paul

Disclaimer

These Archives are provided for informational purposes only and have been generated directly from the Altova mailing list archive system and are comprised of the lists set forth on www.altova.com/list/index.html. Therefore, Altova does not warrant or guarantee the accuracy, reliability, completeness, usefulness, non-infringement of intellectual property rights, or quality of any content on the Altova Mailing List Archive(s), regardless of who originates that content. You expressly understand and agree that you bear all risks associated with using or relying on that content. Altova will not be liable or responsible in any way for any content posted including, but not limited to, any errors or omissions in content, or for any losses or damage of any kind incurred as a result of the use of or reliance on any content. This disclaimer and limitation on liability is in addition to the disclaimers and limitations contained in the Website Terms of Use and elsewhere on the site.