XdmWriter.Create Method (TextWriter, XmlNameTable)XdmWriter.Create Method (TextWriter, XmlNameTable)XdmWriter::Create Method (TextWriter^, XmlNameTable^)

Creates an XdmWriterXdmWriterXdmWriter using the specified TextWriterTextWriterTextWriter and XML name table.

Syntax

Public Shared Function Create( _
    textWriter As System.IO.TextWriter, _
    nameTable As System.Xml.XmlNameTable _
) As XdmWriter
public static XdmWriter Create(
    System.IO.TextWriter textWriter,
    System.Xml.XmlNameTable nameTable
)
public:
static XdmWriter^ Create(
    System.IO::TextWriter^ textWriter, 
    System.Xml::XmlNameTable^ nameTable
)
 

Exceptions

ExceptionCondition
ArgumentNullExceptionArgumentNullExceptionArgumentNullException textWriter or nameTable is null a null reference (Nothing in Visual Basic) nullptr.
XdmExceptionXdmExceptionXdmExceptionThere is an error with the serialization configuration.

Remarks

An XdmWriterSettingsXdmWriterSettingsXdmWriterSettings object with default settings is used to create the writer with EncodingEncodingEncoding and ByteOrderMarkByteOrderMarkByteOrderMark set as appropriate to the supplied textWriter. If you wish to specify the serialization parameters on the created writer, use the overload that takes an XdmWriterSettingsXdmWriterSettingsXdmWriterSettings object as one of its arguments, and pass in an XdmWriterSettingsXdmWriterSettingsXdmWriterSettings object with the correct settings.