Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Wanted: minimal XPath sample

 
Siegfried Heintze
Ranch Hand
Posts: 408
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Sheriff
Posts: 21298
32
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic