Altova Mailing List Archives

Re: Good XPath API for Java?

From: Martin Honnen <mahotrash@-----.-->
Date: 6/16/2009 1:59:00 PM
JS wrote:
> I am trying to learn XPath and would therefore like to be able to 
> execute various XPath statements on different XML files. I have heard 
> that the best way to do this is to find an XPath API for eg. java and 
> then write some small applications. So far I have been looking at:
> But are there any alternatives that should be considered?

I am not sure you need to write an application yourself. The jEdit 
editor for instance has an XSLT/XPath plugin that allows you to evaluate 
XPath expressions against an XML document. And I am sure that is just an 
example, there are certainly other tools already providing XPath evaluation.

As for alternatives, if you want to learn and use XPath 1.0 then I think 
the javax.xml.xpath API is fine but since 2007 we have XPath 2.0 (and 
XQuery 1.0 of which XPath 2.0 is a subset) so you could consider to use 
Saxon from to use the more powerful XPath 
2.0 or XQuery 1.0 language.


	Martin Honnen


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 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.