File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes XML and Related Technologies and the fly likes Wanted: minimal XPath sample Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » XML and Related Technologies
Bookmark "Wanted: minimal XPath sample" Watch "Wanted: minimal XPath sample" New topic
Author

Wanted: minimal XPath sample

Siegfried Heintze
Ranch Hand

Joined: Aug 11, 2000
Posts: 381
Xalan was supposed to contain an XPATH example that could run with only standard jar files. Unfortunately, I can find no such example in the latest xalan.

Can someone convert the example below (or provide a similar example) so it will run without putting xalan in the class path?
Thanks,
Siegfried


(Edited to remove extremely long line that made the post far too wide - PC)
[ December 06, 2007: Message edited by: Paul Clapham ]
Paul Clapham
Bartender

Joined: Oct 14, 2005
Posts: 18570
    
    8

Make sure you are using Java 5 or later. Start by replacing "import org.apache.xpath.XPathAPI;" with "import javax.xml.xpath.*". Then replace the beginning of the XPath code like this:I will let you do the rest of the changes and fix whatever I didn't do quite right there.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Wanted: minimal XPath sample