XMLParserItf Interface CATIXMLXPathExpression
Usage: an implementation of this interface is supplied and you must use it as is. You should not reimplement it.
interface CATIXMLXPathExpression
Interface to represent an XPath expression.
Role: An XPath expression represents a
path in a DOM tree from a root node (called the context
node) to a set of target nodes (called the result set nodes).
XPath expressions can be used to retrieve nodes from a DOM tree
and make DOM programs more compact.
- See also:
-
Method Index
- o
EvaluateAsNode(CATIDOMNode_var&)
- Evaluates an XPath expression of type "node list" and returns the
first item in its result set.
- o
EvaluateAsNodeList(CATIDOMNodeList_var&)
- Evaluates an XPath expression of type "node list" and returns its result set.
- o
GetContext(CATIDOMNode_var&)
- Returns the context node for this expression.
- o
GetExpression(CATUnicodeString&)
- Returns the XPath expression represented by this object.
- o
GetNamespacePrefixes(CATListOfCATUnicodeString&,CATListOfCATUnicodeString&)
- Returns the binding of prefixes used in this XPath expression.
- o
SetNamespacePrefixes(CATListOfCATUnicodeString&,CATListOfCATUnicodeString&)
- Specifies the binding of prefixes used in this XPath expression.
Methods
o EvaluateAsNode
public virtual EvaluateAsNode( | | oResult) |
-
Evaluates an XPath expression of type "node list" and returns the
first item in its result set.
The expression must evaluate to a node list (as opposed to a boolean,
a string or a number), or an error will be returned.
If the expression evaluates to an empty list, NULL_var is returned.
- Parameters:
-
- oResult
- The first node of the result set, or NULL_var if no node matches the expression.
- Returns:
- If the method succeeds, it returns S_OK. Otherwise, it returns an HRESULT error code.
o EvaluateAsNodeList
public virtual EvaluateAsNodeList( | | oResult) |
-
Evaluates an XPath expression of type "node list" and returns its result set.
The expression must evaluate to a node list (as opposed to a boolean, a string or
a number), or an error will be returned. The expression may evaluate to an empty node list.
- Parameters:
-
- oResult
- The result set obtained by evaluating this expression.
- Returns:
- If the method succeeds, it returns S_OK. Otherwise, it returns an HRESULT error code.
o GetContext
public virtual GetContext( | | oContext) |
-
Returns the context node for this expression.
The context node is the DOM node (either a CATIDOMElement_var
or a CATIDOMDocument_var instance) where the expression evaluation will begin.
- Parameters:
-
- oContext
- The context node for this expression.
- Returns:
- If the method succeeds, it returns S_OK. Otherwise, it returns an HRESULT error code.
o GetExpression
public virtual GetExpression( | | oExpression) |
-
Returns the XPath expression represented by this object.
- Parameters:
-
- oExpression
- The XPath expression represented by this object.
- Returns:
- If the method succeeds, it returns S_OK. Otherwise, it returns an HRESULT error code.
o GetNamespacePrefixes
public virtual GetNamespacePrefixes( | | oPrefixes, |
| | oNamespaceURIs) |
-
Returns the binding of prefixes used in this XPath expression.
You must define one such binding for each prefix your
XPath expression uses before invoking EvaluateAsNodeList or EvaluateAsNode.
- Returns:
- If the method succeeds, it returns S_OK. Otherwise, it returns an HRESULT error code.
o SetNamespacePrefixes
public virtual SetNamespacePrefixes( | const | iPrefixes, |
| const | iNamespaceURIs) |
-
Specifies the binding of prefixes used in this XPath expression.
You must define one such binding for each prefix your
XPath expression uses before invoking EvaluateAsNodeList or EvaluateAsNode.
- Returns:
- If the method succeeds, it returns S_OK. Otherwise, it returns an HRESULT error code.
This object is included in the file: CATIXMLXPathExpression.h
If needed, your Imakefile.mk should include the module: CatXmlItfExt
Copyright © 1999-2014, Dassault Systèmes. All rights reserved.