Developer's Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
virtual P6R::P6ERR P6R::p6IXpathExpression::evalBoolean ( p6IDOMXML pXMLTree,
p6IXMLNode pXMLNode,
p6IDOMNodeset pNodeSet,
P6BOOL pbResult 
)
pure virtual

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
SuccessP6R::eOk 
FailureP6R::eNotInitializedgA successful call to intialize() must be made before calling this funciton.
P6R::eInvalidArgOne or more of the pointers are NULL.