com.buglabs.util
Class XpathQuery

java.lang.Object
  extended by com.buglabs.util.XpathQuery

public class XpathQuery
extends java.lang.Object

Reduced XPath query engine against simplified Xml DOM.


Field Summary
static int NODE
           
static int NODE_LIST
          Return a list of nodes.
 
Constructor Summary
XpathQuery()
           
 
Method Summary
static java.lang.Object evaluate(java.lang.String expression, XmlNode element, int returnType)
          Execute a XPath query against a node.
static XmlNode getNode(java.lang.String expression, XmlNode node)
          Convienence method.
static java.util.List getNodes(java.lang.String expression, XmlNode node)
          Convienence method.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

NODE_LIST

public static final int NODE_LIST
Return a list of nodes.

See Also:
Constant Field Values

NODE

public static final int NODE
See Also:
Constant Field Values
Constructor Detail

XpathQuery

public XpathQuery()
Method Detail

getNodes

public static java.util.List getNodes(java.lang.String expression,
                                      XmlNode node)
Convienence method. Calls evaluate with NODE_LIST.

Parameters:
expression -
node -
Returns:

getNode

public static XmlNode getNode(java.lang.String expression,
                              XmlNode node)
Convienence method. Calls evaluate with NODE.

Parameters:
expression -
node -
Returns:

evaluate

public static java.lang.Object evaluate(java.lang.String expression,
                                        XmlNode element,
                                        int returnType)
Execute a XPath query against a node.

Parameters:
expression -
element -
returnType - The type of data expected to be returned.
Returns: