XmlTextWriter()

XmlTextWriter::XmlTextWriter(const SharedPtr<IO::Stream>&, const SharedPtr<Text::Encoding>&) constructor

Creates an instance of the XmlTextWriter class using the specified stream and encoding.

System::Xml::XmlTextWriter::XmlTextWriter(const SharedPtr<IO::Stream> &w, const SharedPtr<Text::Encoding> &encoding)

Arguments

ParameterTypeDescription
wconst SharedPtr<IO::Stream>&The stream to which you want to write.
encodingconst SharedPtr<Text::Encoding>&The encoding to generate. If encoding is nullptr it writes out the stream as UTF-8 and omits the encoding attribute from the ProcessingInstruction.

XmlTextWriter::XmlTextWriter(const String&, const SharedPtr<Text::Encoding>&) constructor

Creates an instance of the XmlTextWriter class using the specified file.

System::Xml::XmlTextWriter::XmlTextWriter(const String &filename, const SharedPtr<Text::Encoding> &encoding)

Arguments

ParameterTypeDescription
filenameconst String&The filename to write to. If the file exists, it truncates it and overwrites it with the new content.
encodingconst SharedPtr<Text::Encoding>&The encoding to generate. If encoding is nullptr it writes the file out as UTF-8 and omits the encoding attribute from the ProcessingInstruction.

XmlTextWriter::XmlTextWriter(const SharedPtr<IO::TextWriter>&) constructor

Creates an instance of the XmlTextWriter class using the specified TextWriter.

System::Xml::XmlTextWriter::XmlTextWriter(const SharedPtr<IO::TextWriter> &w)

Arguments

ParameterTypeDescription
wconst SharedPtr<IO::TextWriter>&The TextWriter to write to. It is assumed that the TextWriter is already set to the correct encoding.

See Also