• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Tim Cooke
  • Jeanne Boyarsky
  • Bear Bibeault
Sheriffs:
  • Knute Snortum
  • paul wheaton
  • Devaka Cooray
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Ron McLeod
  • Piet Souris
  • Ganesh Patekar
Bartenders:
  • Tim Holloway
  • Carey Brown
  • salvin francis

Wanted: minimal XPath sample

 
Ranch Hand
Posts: 420
  • 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 ]
 
Sheriff
Posts: 24635
56
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.
 
Ever since I found this suit I've felt strange new needs. And a tiny ad:
Enterprise-grade Excel API for Java
https://products.aspose.com/cells/java
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!