Evaluate the compiled pattern or expression against the context defined by the following objects: (a) an XML tree (required), (b) an XSLT context node(optional), and (c) an XML node set (optional) One of the compile calls must be made before this method can be called.
This method is used instead of eval() above if all the caller only needs is a true/false result of the XPath expression. This evaluation function includes a few optimizations for faster execution than the regular eval() method.
The result of an XPath expression is considered true if one of the following is detected: (1) the result is a node set with one or more nodes in the set, (2) the result is a string with one or more characters, (3) the result is a non-zero numeric type, or (4) the result is a P6BOOL::P6TRUE value. In all other cases the XPath expression result is considered false.
- Parameters
-
pXMLTree | [ in ] Required, a p6IDOMXML component to evaluated the expression or pattern against. |
pXMLNode | [ in ] Can be NULL, a p6IXMLNode from the p6IDOMXML tree that is used in XSLT as the context node. |
pNodeSet | [ in ] Can be NULL, a node set resulting form a call to p6IDONXML::getNodeSet() method. |
pbResult | [ out ] P6TRUE or P6FALSE |
- Returns
Success | P6R::eOk | |
Failure | P6R::eNotInitializedg | A successful call to intialize() must be made before calling this funciton. |
P6R::eInvalidArg | One or more of the pointers are NULL. |