There are few xpath javacc/jjtree grammars floating around that you can use to generate your own parser. I used one a few years back to build an xpath -> object-relational sql translater. If you dont find one, and your interested, email mail me and I'll send you a grammar.
<br><br>-Kevin<br><br><br><div><span class="gmail_quote">On 10/10/06, <b class="gmail_sendername">Frans Englich</b> <<a href="mailto:frans.englich@telia.com">frans.englich@telia.com</a>> wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Real-To: Frans Englich <<a href="mailto:frans.englich@telia.com">frans.englich@telia.com</a>><br><br>On Tuesday 10 October 2006 11:45, Jonathan Robie wrote:<br>> David Carlisle wrote:<br>> >> Rather, I want the XPath parser to return an array or a
<br>> >> list or tree or anything where I can traverse step by step.<br>> ><br>> > There are xpath and xquery java parsers available from the working group<br>> > pages (maintained by Scott Boag, mainly)
<br>> > <a href="http://www.w3.org/2005/qt-applets/xqueryApplet.html">http://www.w3.org/2005/qt-applets/xqueryApplet.html</a><br>> > This builds an in memory tree of the expression with methods to dump it<br>> > as indented text or as XML.
<br>> > I use it as the parser for xq2xml<br>> > <a href="http://monet.nag.co.uk/xq2xml/index.html">http://monet.nag.co.uk/xq2xml/index.html</a><br>><br>> These parsers are kept up to date with the latest drafts of XPath
2.0<br>> and XQuery 1.0, and the text description in the specifications is<br>> generated from the same grammar as the parser, all the examples in the<br>> specifications (including the use cases) are tested with them, and they
<br>> have had wide review. So there are real advantages to using them. Unless<br>> you need an XPath 1.0 parser.<br><br>Even, the testing task force uses Scott's parser to check tests for parser<br>errors, so its indirectly tested through the XQuery Test Suite.
<br><br><br>Cheers,<br><br> Frans<br>_______________________________________________<br><a href="mailto:talk@x-query.com">talk@x-query.com</a><br><a href="http://x-query.com/mailman/listinfo/talk">http://x-query.com/mailman/listinfo/talk
</a><br><br></blockquote></div><br>