XQuery.EvaluateToItem Method (DynamicContextSettings, IResultDocumentHandler)XQuery.EvaluateToItem Method (DynamicContextSettings, IResultDocumentHandler)XQuery::EvaluateToItem Method (DynamicContextSettings^, IResultDocumentHandler^)
null
a null reference (Nothing
in Visual Basic)
nullptr
if the query returns the empty sequence.
Syntax
Public Function EvaluateToItem( _ settings As DynamicContextSettings, _ resultDocumentHandler As IResultDocumentHandler _ ) As System.Xml.XPath.XPathItem
public System.Xml.XPath.XPathItem EvaluateToItem( DynamicContextSettings settings, IResultDocumentHandler resultDocumentHandler )
public: System.Xml.XPath::XPathItem^ EvaluateToItem( DynamicContextSettings^ settings, IResultDocumentHandler^ resultDocumentHandler )
Parameters
- settings
Type: XmlPrime.DynamicContextSettingsXmlPrime.DynamicContextSettingsXmlPrime::DynamicContextSettings^
The settings of the dynamic evaluation context.
- 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 | settings 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. |
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).
This method is suitable for queries which use fn:put
.