|
BEA Systems, Inc. | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--weblogic.xml.xpath.XMLNodeXPath
Evaluates an XPath against an XMLNode representation of an XML document.
Due to some limitations in the way XMLNode models an XML document, it is impossible for XMLNodeXPath to fully support the XPath specification. The XMLNodeXPath constructor will throw an XPathUnsupportedException if the given XPath contains any of the unsupported features or constructs described below:
The following axes cannot be supported by XMLNodeXPath: attribute, namespace, comment, processing-instruction, following, following-sibling, preceding, preceding-sibling.
Field Summary | |
static int |
BOOLEAN
Returned by getType() to indicate that this XPath
evaluates to a boolean. |
static int |
NODESET
Returned by getType() to indicate that this XPath
evaluates to a node-set. |
static int |
NUMBER
Returned by getType() to indicate that this XPath
evaluates to a floating point number. |
static int |
OTHER
Returned by getType() to indicate that this XPath
evaluates to an extension-defined object. |
static int |
STRING
Returned by getType() to indicate that this XPath
evaluates to a string. |
Constructor Summary | |
XMLNodeXPath(java.lang.String xpath)
Constructs an object for evaluating the XPath expression contained in the given String. |
Method Summary | |
boolean |
evaluateAsBoolean(weblogic.xml.xmlnode.XMLNode node)
Evaluates this XPath in the context of the given XMLNode Node and returns the result as a boolean. |
java.util.List |
evaluateAsNodeset(weblogic.xml.xmlnode.XMLNode node)
Evaluates this XPath in the context of the given Node and returns the result as a node-set. |
double |
evaluateAsNumber(weblogic.xml.xmlnode.XMLNode node)
Evaluates this XPath in the context of the given XMLNode Node and returns the result as a number. |
java.lang.String |
evaluateAsString(weblogic.xml.xmlnode.XMLNode node)
Evaluates this XPath in the context of the given XMLNode Node and returns the result as a String. |
int |
getType()
Returns one of the integer constants declared above to indicate what type of value this XPath returns. |
static void |
main(java.lang.String[] args)
This method allows an expression to be evaluated from the command line. |
void |
setVariableBindings(java.util.Map bindings)
Sets the variable bindings for the evaluation process. |
java.lang.String |
toString()
Returns the string used to construct thie XPath. |
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
wait,
wait,
wait |
Field Detail |
public static final int NODESET
getType()
to indicate that this XPath
evaluates to a node-set.public static final int BOOLEAN
getType()
to indicate that this XPath
evaluates to a boolean.public static final int NUMBER
getType()
to indicate that this XPath
evaluates to a floating point number.public static final int STRING
getType()
to indicate that this XPath
evaluates to a string.public static final int OTHER
getType()
to indicate that this XPath
evaluates to an extension-defined object.Constructor Detail |
public XMLNodeXPath(java.lang.String xpath) throws XPathException
xpath
- The XPath to be evaluated.xpath
is not a valid xpath
or contains xpath constructs which are not supported.Method Detail |
public int getType() throws XPathException
public void setVariableBindings(java.util.Map bindings)
variableBindings
- Provides a mapping for resolving variable
names which may appear in the XPath. Values in the map which are
instances of java.lang.String
,
java.lang.Boolean
, or java.lang.Number
will be used as values of the corresponding XPath types. Values
which are instances of java.util.List
are assumed to
be node-lists. Values of other types are not currently
recognized.public java.lang.String evaluateAsString(weblogic.xml.xmlnode.XMLNode node) throws XPathException
public boolean evaluateAsBoolean(weblogic.xml.xmlnode.XMLNode node) throws XPathException
public java.util.List evaluateAsNodeset(weblogic.xml.xmlnode.XMLNode node) throws XPathException
public double evaluateAsNumber(weblogic.xml.xmlnode.XMLNode node) throws XPathException
public java.lang.String toString()
public static void main(java.lang.String[] args) throws java.lang.Exception
|
Documentation is available at http://download.oracle.com/docs/cd/E13222_01/wls/docs81b |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |