XQuery.Serialize Method (XmlWriter, XPathItem)XQuery.Serialize Method (XmlWriter, XPathItem)XQuery::Serialize Method (XmlWriter^, XPathItem^)

Serializes the result of the query to the specified XmlWriterXmlWriterXmlWriter.

Syntax

Public Sub Serialize( _
    writer As System.Xml.XmlWriter, _
    contextItem As System.Xml.XPath.XPathItem _
)
public void Serialize(
    System.Xml.XmlWriter writer,
    System.Xml.XPath.XPathItem contextItem
)
public:
void Serialize(
    System.Xml::XmlWriter^ writer, 
    System.Xml.XPath::XPathItem^ contextItem
)
 

Parameters

writer

Type: System.Xml.XmlWriterSystem.Xml.XmlWriterSystem.Xml::XmlWriter^

The XmlWriterXmlWriterXmlWriter to which the result of the query will be written.

contextItem

Type: System.Xml.XPath.XPathItemSystem.Xml.XPath.XPathItemSystem.Xml.XPath::XPathItem^

The context item for the query.

Exceptions

ExceptionCondition
ArgumentNullExceptionArgumentNullExceptionArgumentNullException writer or contextItem is null a null reference (Nothing in Visual Basic) nullptr.
InvalidOperationExceptionInvalidOperationExceptionInvalidOperationExceptionThe query is an updating expression.
XdmExceptionXdmExceptionXdmException A dynamic error was encountered while evaluating the query.