XdmWriter.Serialize Method (XmlReader, Stream, XdmWriterSettings)XdmWriter.Serialize Method (XmlReader, Stream, XdmWriterSettings)XdmWriter::Serialize Method (XmlReader^, Stream^, XdmWriterSettings^)

Serializes data from the specified XmlReaderXmlReaderXmlReader to the specified StreamStreamStream.

Syntax

Public Shared Sub Serialize( _
    reader As System.Xml.XmlReader, _
    stream As System.IO.Stream, _
    settings As XdmWriterSettings _
)
public static void Serialize(
    System.Xml.XmlReader reader,
    System.IO.Stream stream,
    XdmWriterSettings settings
)
public:
static void Serialize(
    System.Xml::XmlReader^ reader, 
    System.IO::Stream^ stream, 
    XdmWriterSettings^ settings
)
 

Exceptions

ExceptionCondition
ArgumentNullExceptionArgumentNullExceptionArgumentNullException reader, stream 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.