XQuery.EvaluateToItem Method (XPathItem, IResultDocumentHandler)XQuery.EvaluateToItem Method (XPathItem, IResultDocumentHandler)XQuery::EvaluateToItem Method (XPathItem^, IResultDocumentHandler^)
null
a null reference (Nothing in Visual Basic)
nullptr if the query returns the empty sequence.
Syntax
Public Function EvaluateToItem( _ contextItem As System.Xml.XPath.XPathItem, _ resultDocumentHandler As IResultDocumentHandler _ ) As System.Xml.XPath.XPathItem
public System.Xml.XPath.XPathItem EvaluateToItem( System.Xml.XPath.XPathItem contextItem, IResultDocumentHandler resultDocumentHandler )
public: System.Xml.XPath::XPathItem^ EvaluateToItem( System.Xml.XPath::XPathItem^ contextItem, IResultDocumentHandler^ resultDocumentHandler )
Parameters
- contextItem
Type: System.Xml.XPath.XPathItemSystem.Xml.XPath.XPathItemSystem.Xml.XPath::XPathItem^
The context item for the query.
- resultDocumentHandler
Type: XmlPrime.IResultDocumentHandlerXmlPrime.IResultDocumentHandlerXmlPrime::IResultDocumentHandler^
The result document handler.
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 query returns the empty sequence.
Exceptions
| Exception | Condition |
| ArgumentNullExceptionArgumentNullExceptionArgumentNullException | contextItem is null
a null reference (Nothing in Visual Basic)
nullptr. |
| XdmExceptionXdmExceptionXdmException | An error occurred evaluating the query. |
| InvalidOperationExceptionInvalidOperationExceptionInvalidOperationException | An error is raised if the expression returns more than one item. |
| LicenceExceptionLicenceExceptionLicenceException | This version of XmlPrime has expired. |
Remarks
The item in returned will either be an XPathNavigatorXPathNavigatorXPathNavigator instance (if the expression returns a node) or XPathAtomicValueXPathAtomicValueXPathAtomicValue instances (if the expression returns an atomic value). values).
This method is suitable for queries which use fn:put.
