XQuery.Serialize Method (string, XPathItem)XQuery.Serialize Method (String, XPathItem)XQuery::Serialize Method (String^, XPathItem^)

Serializes the result of the query to the specified file.

Syntax

Public Sub Serialize( _
    outputFileName As String, _
    contextItem As System.Xml.XPath.XPathItem _
)
public void Serialize(
    string outputFileName,
    System.Xml.XPath.XPathItem contextItem
)
public:
void Serialize(
    String^ outputFileName, 
    System.Xml.XPath::XPathItem^ contextItem
)
 

Parameters

outputFileName

Type: System.StringSystem.StringSystem::String^

The name of the file to which the result of the query will be written. The outputFileName must be a file system path.

contextItem

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

The context item for the query.

Exceptions

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