OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.


Help: OASIS Mailing Lists Help | MarkMail Help

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

[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