XPath.EvaluateToItem Method (XPathItem, long, long)XPath.EvaluateToItem Method (XPathItem, Long, Long)XPath::EvaluateToItem Method (XPathItem^, long, long)
- XmlPrime 4.0
- Other Versions ▼
null
a null reference (Nothing
in Visual Basic)
nullptr
if the expression returns the empty sequence.
Syntax
Public Function EvaluateToItem( _ contextItem As System.Xml.XPath.XPathItem, _ contextPosition As Long, _ contextSize As Long _ ) As System.Xml.XPath.XPathItem
public System.Xml.XPath.XPathItem EvaluateToItem( System.Xml.XPath.XPathItem contextItem, long contextPosition, long contextSize )
public: System.Xml.XPath::XPathItem^ EvaluateToItem( 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.Xml.XPath.XPathItemSystem.Xml.XPath.XPathItemSystem.Xml.XPath::XPathItem^
An XPathItemXPathItemXPathItem, or null
a null reference (Nothing
in Visual Basic)
nullptr
if the expression returns the empty sequence.
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. |
InvalidOperationExceptionInvalidOperationExceptionInvalidOperationException | An error is raised if the expression returns more than one item. |
LicenceExceptionLicenceExceptionLicenceException | This version of XmlPrime has expired. |
Remarks
The item returned will either be an instance 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).