Create()

XmlWriter::Create(const String&) method

Creates a new XmlWriter instance using the specified filename.

static SharedPtr<XmlWriter> System::Xml::XmlWriter::Create(const String &outputFileName)

Arguments

ParameterTypeDescription
outputFileNameconst String&The file to which you want to write. The XmlWriter creates a file at the specified path and writes to it in XML 1.0 text syntax. The outputFileName must be a file system path.

Return Value

An XmlWriter object.

XmlWriter::Create(const String&, SharedPtr<XmlWriterSettings>) method

Creates a new XmlWriter instance using the filename and XmlWriterSettings object.

static SharedPtr<XmlWriter> System::Xml::XmlWriter::Create(const String &outputFileName, SharedPtr<XmlWriterSettings> settings)

Arguments

ParameterTypeDescription
outputFileNameconst String&The file to which you want to write. The XmlWriter creates a file at the specified path and writes to it in XML 1.0 text syntax. The outputFileName must be a file system path.
settingsSharedPtr<XmlWriterSettings>The XmlWriterSettings object used to configure the new XmlWriter instance. If this is nullptr, a XmlWriterSettings with default settings is used. If the XmlWriter is being used with the XslCompiledTransform:Transform(String,SharedPtr) method, you should use the XslCompiledTransform::get_OutputSettings value to obtain an XmlWriterSettings object with the correct settings. This ensures that the created XmlWriter object has the correct output settings.

Return Value

An XmlWriter object.

XmlWriter::Create(const SharedPtr<IO::Stream>&) method

Creates a new XmlWriter instance using the specified stream.

static SharedPtr<XmlWriter> System::Xml::XmlWriter::Create(const SharedPtr<IO::Stream> &output)

Arguments

ParameterTypeDescription
outputconst SharedPtr<IO::Stream>&The stream to which you want to write. The XmlWriter writes XML 1.0 text syntax and appends it to the specified stream.

Return Value

An XmlWriter object.

XmlWriter::Create(const SharedPtr<IO::Stream>&, SharedPtr<XmlWriterSettings>) method

Creates a new XmlWriter instance using the stream and XmlWriterSettings object.

static SharedPtr<XmlWriter> System::Xml::XmlWriter::Create(const SharedPtr<IO::Stream> &output, SharedPtr<XmlWriterSettings> settings)

Arguments

ParameterTypeDescription
outputconst SharedPtr<IO::Stream>&The stream to which you want to write. The XmlWriter writes XML 1.0 text syntax and appends it to the specified stream.
settingsSharedPtr<XmlWriterSettings>The XmlWriterSettings object used to configure the new XmlWriter instance. If this is nullptr, a XmlWriterSettings with default settings is used. If the XmlWriter is being used with the XslCompiledTransform:Transform(String,SharedPtr) method, you should use the XslCompiledTransform::get_OutputSettings value to obtain an XmlWriterSettings object with the correct settings. This ensures that the created XmlWriter object has the correct output settings.

Return Value

An XmlWriter object.

XmlWriter::Create(const SharedPtr<IO::TextWriter>&) method

Creates a new XmlWriter instance using the specified TextWriter.

static SharedPtr<XmlWriter> System::Xml::XmlWriter::Create(const SharedPtr<IO::TextWriter> &output)

Arguments

ParameterTypeDescription
outputconst SharedPtr<IO::TextWriter>&The TextWriter to which you want to write. The XmlWriter writes XML 1.0 text syntax and appends it to the specified TextWriter.

Return Value

An XmlWriter object.

XmlWriter::Create(const SharedPtr<IO::TextWriter>&, SharedPtr<XmlWriterSettings>) method

Creates a new XmlWriter instance using the TextWriter and XmlWriterSettings objects.

static SharedPtr<XmlWriter> System::Xml::XmlWriter::Create(const SharedPtr<IO::TextWriter> &output, SharedPtr<XmlWriterSettings> settings)

Arguments

ParameterTypeDescription
outputconst SharedPtr<IO::TextWriter>&The TextWriter to which you want to write. The XmlWriter writes XML 1.0 text syntax and appends it to the specified TextWriter.
settingsSharedPtr<XmlWriterSettings>The XmlWriterSettings object used to configure the new XmlWriter instance. If this is nullptr, a XmlWriterSettings with default settings is used. If the XmlWriter is being used with the XslCompiledTransform:Transform(String,SharedPtr) method, you should use the XslCompiledTransform::get_OutputSettings value to obtain an XmlWriterSettings object with the correct settings. This ensures that the created XmlWriter object has the correct output settings.

Return Value

An XmlWriter object.

XmlWriter::Create(const SharedPtr<Text::StringBuilder>&) method

Creates a new XmlWriter instance using the specified Text::StringBuilder.

static SharedPtr<XmlWriter> System::Xml::XmlWriter::Create(const SharedPtr<Text::StringBuilder> &output)

Arguments

ParameterTypeDescription
outputconst SharedPtr<Text::StringBuilder>&The Text::StringBuilder to which to write to. Content written by the XmlWriter is appended to the Text::StringBuilder.

Return Value

An XmlWriter object.

XmlWriter::Create(const SharedPtr<Text::StringBuilder>&, SharedPtr<XmlWriterSettings>) method

Creates a new XmlWriter instance using the Text::StringBuilder and XmlWriterSettings objects.

static SharedPtr<XmlWriter> System::Xml::XmlWriter::Create(const SharedPtr<Text::StringBuilder> &output, SharedPtr<XmlWriterSettings> settings)

Arguments

ParameterTypeDescription
outputconst SharedPtr<Text::StringBuilder>&The Text::StringBuilder to which to write to. Content written by the XmlWriter is appended to the Text::StringBuilder.
settingsSharedPtr<XmlWriterSettings>The XmlWriterSettings object used to configure the new XmlWriter instance. If this is nullptr, a XmlWriterSettings with default settings is used. If the XmlWriter is being used with the XslCompiledTransform:Transform(String,SharedPtr) method, you should use the XslCompiledTransform::get_OutputSettings value to obtain an XmlWriterSettings object with the correct settings. This ensures that the created XmlWriter object has the correct output settings.

Return Value

An XmlWriter object.

XmlWriter::Create(const SharedPtr<XmlWriter>&) method

Creates a new XmlWriter instance using the specified XmlWriter object.

static SharedPtr<XmlWriter> System::Xml::XmlWriter::Create(const SharedPtr<XmlWriter> &output)

Arguments

ParameterTypeDescription
outputconst SharedPtr<XmlWriter>&The XmlWriter object that you want to use as the underlying writer.

Return Value

An XmlWriter object that is wrapped around the specified XmlWriter object.

XmlWriter::Create(const SharedPtr<XmlWriter>&, SharedPtr<XmlWriterSettings>) method

Creates a new XmlWriter instance using the specified XmlWriter and XmlWriterSettings objects.

static SharedPtr<XmlWriter> System::Xml::XmlWriter::Create(const SharedPtr<XmlWriter> &output, SharedPtr<XmlWriterSettings> settings)

Arguments

ParameterTypeDescription
outputconst SharedPtr<XmlWriter>&The XmlWriter object that you want to use as the underlying writer.
settingsSharedPtr<XmlWriterSettings>The XmlWriterSettings object used to configure the new XmlWriter instance. If this is nullptr, a XmlWriterSettings with default settings is used. If the XmlWriter is being used with the XslCompiledTransform:Transform(String,SharedPtr) method, you should use the XslCompiledTransform::get_OutputSettings value to obtain an XmlWriterSettings object with the correct settings. This ensures that the created XmlWriter object has the correct output settings.

Return Value

An XmlWriter object that is wrapped around the specified XmlWriter object.

See Also