Two Laptop Bag*
The moose likes XML and Related Technologies and the fly likes xpath library Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCA/OCP Java SE 7 Programmer I & II Study Guide this week in the OCPJP forum!
JavaRanch » Java Forums » Engineering » XML and Related Technologies
Bookmark "xpath library" Watch "xpath library" New topic
Author

xpath library

avaya sahu
Greenhorn

Joined: Oct 16, 2001
Posts: 14
Hi, I am new to XPath. Can any one let me know from where I can download xpath library(free and meets w3c specification). I am using jdk 1.4.
Is there any such library form w3c. Please let me know.
It is very urgent.

Thanks in advance !!!
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 42371
    
  64
First of all, Patience Is A Virtue.

As to your question, Apache Xerces is one such a library.


Ping & DNS - my free Android networking tools app
avaya sahu
Greenhorn

Joined: Oct 16, 2001
Posts: 14
Originally posted by Ulf Dittmer:
First of all, Patience Is A Virtue.

As to your question, Apache Xerces is one such a library.


I have very specific requirement, so wnatted to know whether it can handle it or not.

I have an element node with me and user will give xpath relative to the element to retrive to node(s) pointed by the xpath.

It should support attribute and regular expression.
pls. let me know what API(class) should be used for this?
David Patterson
Ranch Hand

Joined: Jul 01, 2002
Posts: 65
Try org.apache.xpath.CachedXPathAPI
or
org.apache.xpath.XPathAPI.

Both will allow you to specify an XPath string and it will return what you have asked for. This may or may not be what you wanted.

XPath supports XPath strings, not Regular Expressions. There is a learning curve associated with XPath.

Dave Patterson
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 42371
    
  64
There is a learning curve associated with XPath.


@David: That is a great characterization; I shall have to remember it.
 
 
subject: xpath library