XPath.Evaluate Method (XPathItem, long, long)XPath.Evaluate Method (XPathItem, Long, Long)XPath::Evaluate Method (XPathItem^, long, long)
- XmlPrime 4.0
- Other Versions ▼
Syntax
Public Function Evaluate( _ contextItem As System.Xml.XPath.XPathItem, _ contextPosition As Long, _ contextSize As Long _ ) As IEnumerable(Of System.Xml.XPath.XPathItem)
public IEnumerable<System.Xml.XPath.XPathItem> Evaluate( System.Xml.XPath.XPathItem contextItem, long contextPosition, long contextSize )
public: IEnumerable<System.Xml.XPath::XPathItem^>^ Evaluate( System.Xml.XPath::XPathItem^ contextItem, long contextPosition, long contextSize )
Parameters
- contextItem
Type: System.Xml.XPath.XPathItemSystem.Xml.XPath.XPathItemSystem.Xml.XPath::XPathItem^
The initial context item for the expression.
- contextPosition
Type: System.Int64System.Int64System::Int64
The initial context position for the expression.
- contextSize
Type: System.Int64System.Int64System::Int64
The initial context size for the expression.
Return Value
Type: System.Collections.Generic.IEnumerable<T>System.Collections.Generic.IEnumerable(Of T)System.Collections.Generic::IEnumerable<T>^
An IEnumerable<T>IEnumerable(Of T)IEnumerable<T> representing the result of evaluating the XPath expression.
Exceptions
Exception | Condition |
ArgumentNullExceptionArgumentNullExceptionArgumentNullException | contextItem is null
a null reference (Nothing in Visual Basic)
nullptr . |
ArgumentOutOfRangeExceptionArgumentOutOfRangeExceptionArgumentOutOfRangeException | contextSize is outside of the range 1 to MaxValueMaxValueMaxValue, or contextPosition is outside of the range 1 to contextSize. |
XdmExceptionXdmExceptionXdmException | An error occurred evaluating the expression. |
Remarks
The items in the returned IEnumerable<T>IEnumerable(Of T)IEnumerable<T> will all be instances of XPathNavigatorXPathNavigatorXPathNavigator (if the expression returns a node), XPathAtomicValueXPathAtomicValueXPathAtomicValue (if the expression returns an atomic value) or XPathFunctionItemXPathFunctionItemXPathFunctionItem (if the expression returns a function item).
The results of the expression are only evaluated whilst they are enumerated. Any errors encountered during evaluation may be thrown from the MoveNextMoveNextMoveNext method and CurrentCurrentCurrent property of the enumerator over the IEnumerable<T>IEnumerable(Of T)IEnumerable<T>.