com.metamatrix.common.xml
Class XPathUtil

java.lang.Object
  extended by com.metamatrix.common.xml.XPathUtil

public class XPathUtil
extends java.lang.Object


Nested Class Summary
static class XPathUtil.ExpressionToken
           
static class XPathUtil.Literal
           
static class XPathUtil.Operator
           
 
Field Summary
static java.lang.String STEP_DELIMITER
          Delimiter for XPath
static char STEP_DELIMITER_CHAR
           
 
Constructor Summary
XPathUtil()
           
 
Method Summary
protected static java.lang.StringBuffer addToXPath(org.jdom.Element tag, java.lang.StringBuffer sb)
           
static java.lang.String getAbsolutePath(org.jdom.Attribute attribute)
          Get the absolute path using the abbreviated format of XPath 1.0 for the specified attribute.
static java.lang.String getAbsolutePath(org.jdom.Element tag)
          Get the absolute path using the abbreviated format of XPath 1.0 for the specified element.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

STEP_DELIMITER

public static final java.lang.String STEP_DELIMITER
Delimiter for XPath

See Also:
Constant Field Values

STEP_DELIMITER_CHAR

public static final char STEP_DELIMITER_CHAR
Constructor Detail

XPathUtil

public XPathUtil()
Method Detail

getAbsolutePath

public static java.lang.String getAbsolutePath(org.jdom.Element tag)
Get the absolute path using the abbreviated format of XPath 1.0 for the specified element. For example, the following XPath:

/doc/chapter[5]/section[2]

specifies the second section of the fifth chapter of the document.

Returns:
the XPath of the specified element.
See Also:
XPath

getAbsolutePath

public static java.lang.String getAbsolutePath(org.jdom.Attribute attribute)
Get the absolute path using the abbreviated format of XPath 1.0 for the specified attribute. For example, the following XPath:

/doc/chapter[5]/section[2]/@title

specifies the title attribute of the second section of the fifth chapter of the document.

Returns:
the XPath of the specified element.
See Also:
XPath

addToXPath

protected static java.lang.StringBuffer addToXPath(org.jdom.Element tag,
                                                   java.lang.StringBuffer sb)


Copyright © 2009. All Rights Reserved.