XQuery.Evaluate Method (DynamicContextSettings, IResultDocumentHandler)XQuery.Evaluate Method (DynamicContextSettings, IResultDocumentHandler)XQuery::Evaluate Method (DynamicContextSettings^, IResultDocumentHandler^)
Syntax
Public Function Evaluate( _ settings As DynamicContextSettings, _ resultDocumentHandler As IResultDocumentHandler _ ) As XPathItemCollection
public XPathItemCollection Evaluate( DynamicContextSettings settings, IResultDocumentHandler resultDocumentHandler )
public: XPathItemCollection^ Evaluate( 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: XmlPrime.XPathItemCollectionXmlPrime.XPathItemCollectionXmlPrime::XPathItemCollection^
An XPathItemCollectionXPathItemCollectionXPathItemCollection representing the result of evaluating the XQuery program.
Exceptions
Exception | Condition |
ArgumentNullExceptionArgumentNullExceptionArgumentNullException | settings or resultDocumentHandler are null
a null reference (Nothing in Visual Basic)
nullptr . |
XdmExceptionXdmExceptionXdmException | An error occurred evaluating the query. |
Remarks
The items in the returned XPathItemCollectionXPathItemCollectionXPathItemCollection will all either be XPathNavigatorXPathNavigatorXPathNavigator instances (for nodes) or XPathAtomicValueXPathAtomicValueXPathAtomicValue instances (for atomic values).
The results of the query 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 XPathItemCollectionXPathItemCollectionXPathItemCollection.
This method is suitable for both updating and non-updating queries.