com.ibm.wsdl.util.xml

Class XPathUtils

public class XPathUtils extends Object

A XPathUtils ...

Author: Matthew J. Duftler (duftler@us.ibm.com) Sanjiva Weerawarana (sanjiva@watson.ibm.com)

Method Summary
static StringgetXPathExprFromNode(Node node)
Generates an XPath expression that will return only the given node as its result.

Method Detail

getXPathExprFromNode

public static String getXPathExprFromNode(Node node)
Generates an XPath expression that will return only the given node as its result. This method only works for element, text, document and PI nodes.

Parameters: node the node to generate an XPath expression for. This node must be an element node, a text node, a document node, or a processing instruction node.

Returns: an XPath expression that will return only the given node as its result.

Throws: IllegalArgumentException if the given node is not an element, text, document or PI node.

Copyright B) 2003,2005 IBM. All Rights Reserved.