You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@commons.apache.org by Alex <al...@partners.netfocus.es> on 2005/11/02 08:29:24 UTC

RE: What is the perfered way to perfom XPath on org.w3c.dom?

You can use a class named Xpath from javax.xml.xpath

I send you an example

XPath xpath = XPathFactory.newInstance().newXPath();
			Node node = (Node) xpath.evaluate(xPath,
sourceFile,
					XPathConstants.NODE); 

-----Mensaje original-----
De: Siegfried Heintze [mailto:siegfried@heintze.com] 
Enviado el: lunes, 31 de octubre de 2005 7:49
Para: commons-user@jakarta.apache.org
Asunto: What is the perfered way to perfom XPath on org.w3c.dom?

I was looking at
http://javaalmanac.com/egs/org.w3c.dom/xpath_GetAbsElem.html and this
does
what I want. 

 

Where do I download "org.apache.xpath.XPathAPI"? 

 

When I went to xml.apache.org all I could find was jxpath. Does this
supersede org.apache.xpath?

 

I could not find any examples of using the xpath with org.w3c.dom in
jxpath.
Is jxpath compatible with org.w3c.dom? 

 

Thanks,

Siegfried

 

 

 

 

 



---------------------------------------------------------------------
To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-user-help@jakarta.apache.org