XdmWriter.Serialize Method (XmlReader, string, XdmWriterSettings)XdmWriter.Serialize Method (XmlReader, String, XdmWriterSettings)XdmWriter::Serialize Method (XmlReader^, String^, XdmWriterSettings^)

Serializes data from the specified XmlReaderXmlReaderXmlReader to the specified file.

Syntax

Public Shared Sub Serialize( _
    reader As System.Xml.XmlReader, _
    outputFileName As String, _
    settings As XdmWriterSettings _
)
public static void Serialize(
    System.Xml.XmlReader reader,
    string outputFileName,
    XdmWriterSettings settings
)
public:
static void Serialize(
    System.Xml::XmlReader^ reader, 
    String^ outputFileName, 
    XdmWriterSettings^ settings
)
 

Parameters

reader

Type: System.Xml.XmlReaderSystem.Xml.XmlReaderSystem.Xml::XmlReader^

The document to serialize.

outputFileName

Type: System.StringSystem.StringSystem::String^

The name of the file to which you want to write. The outputFileName must be a file system path.

settings

Type: XmlPrime.Serialization.XdmWriterSettingsXmlPrime.Serialization.XdmWriterSettingsXmlPrime.Serialization::XdmWriterSettings^

The serialization settings.

Exceptions

ExceptionCondition
ArgumentNullExceptionArgumentNullExceptionArgumentNullException reader, outputFileName or settings is null a null reference (Nothing in Visual Basic) nullptr.
XdmExceptionXdmExceptionXdmExceptionAn error occurred during serialization.

Remarks

If the ConformanceLevelConformanceLevelConformanceLevel property of settings has value DocumentDocumentDocument, then only the subtree on which reader is positioned and any following comment, processing instuctions and whitespace nodes will be serialized. Otherwise, the subtree on which reader is positioned together with any siblings.