fr.inria.ketuk
Class XPathUtil

java.lang.Object
  |
  +--fr.inria.ketuk.XPathUtil

public class XPathUtil
extends java.lang.Object

Utilities to manipulate XPaths

Author:
Claude Pasquier

Constructor Summary
XPathUtil()
           
 
Method Summary
static java.lang.String computeXPath(org.w3c.dom.Node base, org.w3c.dom.Node sourceNode)
          Computes an unambiguous XPath allowing to reach sourceNode from the specified baseNode
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

XPathUtil

public XPathUtil()
Method Detail

computeXPath

public static java.lang.String computeXPath(org.w3c.dom.Node base,
                                            org.w3c.dom.Node sourceNode)
Computes an unambiguous XPath allowing to reach sourceNode from the specified baseNode

if baseNode equals null, then the root of the DOM tree is used

Parameters:
base - the base of the XPAth
sourceNode - the node that has to be pointed by the XPath
Returns:
the resulting XPath