System::Xml::XmlWriterSettings class

XmlWriterSettings class

Specifies a set of features to support on the XmlWriter object created by the XmlWriter::Create method.

class XmlWriterSettings : public System::Object

Methods

MethodDescription
Clone()Creates a copy of the XmlWriterSettings instance.
get_CheckCharacters()Returns a value that indicates whether the XML writer should check to ensure that all characters in the document conform to the “2.2 Characters” section of the W3C XML 1.0 Recommendation.
get_CloseOutput()Returns a value indicating whether the XmlWriter should also close the underlying stream or TextWriter when the XmlWriter::Close method is called.
get_ConformanceLevel()Returns the level of conformance that the XML writer checks the XML output for.
get_DoNotEscapeUriAttributes()Returns a value that indicates whether the XmlWriter does not escape URI attributes.
get_Encoding()Returns the type of text encoding to use.
get_Indent()Returns a value indicating whether to indent elements.
get_IndentChars()Returns the character string to use when indenting. This setting is used when the XmlWriterSettings::set_Indent value is set to true.
get_NamespaceHandling()Returns a value that indicates whether the XmlWriter should remove duplicate namespace declarations when writing XML content. The default behavior is for the writer to output all namespace declarations that are present in the writer’s namespace resolver.
get_NewLineChars()Returns the character string to use for line breaks.
get_NewLineHandling()Returns a value indicating whether to normalize line breaks in the output.
get_NewLineOnAttributes()Returns a value indicating whether to write attributes on a new line.
get_OmitXmlDeclaration()Returns a value indicating whether to omit an XML declaration.
get_OutputMethod()Returns the method used to serialize the XmlWriter output.
get_WriteEndDocumentOnClose()Returns a value that indicates whether the XmlWriter will add closing tags to all unclosed element tags when the XmlWriter::Close method is called.
Reset()Resets the members of the settings class to their default values.
set_CheckCharacters(bool)Sets a value that indicates whether the XML writer should check to ensure that all characters in the document conform to the “2.2 Characters” section of the W3C XML 1.0 Recommendation.
set_CloseOutput(bool)Sets a value indicating whether the XmlWriter should also close the underlying stream or TextWriter when the XmlWriter::Close method is called.
set_ConformanceLevel(System::Xml::ConformanceLevel)Sets the level of conformance that the XML writer checks the XML output for.
set_DoNotEscapeUriAttributes(bool)Sets a value that indicates whether the XmlWriter does not escape URI attributes.
set_Encoding(const SharedPtr<System::Text::Encoding>&)Sets the type of text encoding to use.
set_Indent(bool)Sets a value indicating whether to indent elements.
set_IndentChars(const String&)Sets the character string to use when indenting. This setting is used when the XmlWriterSettings::set_Indent value is set to true.
set_NamespaceHandling(System::Xml::NamespaceHandling)Sets a value that indicates whether the XmlWriter should remove duplicate namespace declarations when writing XML content. The default behavior is for the writer to output all namespace declarations that are present in the writer’s namespace resolver.
set_NewLineChars(const String&)Sets the character string to use for line breaks.
set_NewLineHandling(System::Xml::NewLineHandling)Sets a value indicating whether to normalize line breaks in the output.
set_NewLineOnAttributes(bool)Sets a value indicating whether to write attributes on a new line.
set_OmitXmlDeclaration(bool)Sets a value indicating whether to omit an XML declaration.
set_WriteEndDocumentOnClose(bool)Sets a value that indicates whether the XmlWriter will add closing tags to all unclosed element tags when the XmlWriter::Close method is called.
XmlWriterSettings()Initializes a new instance of the XmlWriterSettings class.

Typedefs

TypedefDescription
PtrAn alias for shared pointer to an instance of this class.

Remarks

Objects of this class should only be allocated using System::MakeObject() function. Never create instances of this type on stack or using operator new, as it will result in runtime errors and/or assertion faults. Always wrap this class into System::SmartPtr pointer and use this pointer to pass it to functions as argument.

See Also