Lists Home |
Date Index |
I'm working on developing a new style of XML parser. I've created an
initial proof of concept implementation (in Java), and I'd be grateful for
feedback on it.
My idea is to create a single high level, DOM-like API which is suitable
for both streaming and in-memory parsers. I believe this design has
several advantages over existing parsers:
- It's much easier to use than other streaming parsers like SAX or StAX,
since you get to work with a high level, object oriented representation of
the XML content. It's very similar to existing DOM APIs. The only
restriction is that, if you're using a streaming parser, you're required
to access the nodes in the order they appear in the file.
- Switching from an in-memory parser to a streaming parser (or vice versa)
is much easier than it would be with any other two parsers, because both
of them use exactly the same API. You can even choose which parser to use
at runtime (based on the file size, or example, or how many passes you'll
need to make through it).
- Many utilities can be written once, then used with either parser.
You can find a document giving more details on the motivation and design
of the parser at
and the current implementation at
All source code is included, and is in the public domain. Thanks for your