Document.Evaluate

Document.Evaluate method

Evaluates an XPath expression string and returns a result of the specified type if possible.

public IXPathResult Evaluate(string expression, Node contextNode, IXPathNSResolver resolver, 
    XPathResultType type, object result)
ParameterTypeDescription
expressionStringThe XPath expression string to be parsed and evaluated.
contextNodeNodeThe context is context node for the evaluation of this XPath expression.
resolverIXPathNSResolverThe resolver permits translation of all prefixes, including the xml namespace prefix, within the XPath expression into appropriate namespace URIs.
typeXPathResultTypeIf a specific type is specified, then the result will be returned as the corresponding type.
resultObjectThe result specifies a specific result object which may be reused and returned by this method.

Return Value

The result of the evaluation of the XPath expression.

See Also