<PackageReference Include="System.Xml.ReaderWriter" Version="4.0.11-beta-23409" />

XmlWriterSettings

public sealed class XmlWriterSettings
Specifies a set of features to support on the XmlWriter object created by the Create method.
public bool Async { get; set; }

Gets or sets a value that indicates whether asynchronous XmlWriter methods can be used on a particular XmlWriter instance.

public bool CheckCharacters { get; set; }

Gets or 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.

public bool CloseOutput { get; set; }

Gets or sets a value indicating whether the XmlWriter should also close the underlying stream or TextWriter when the Close method is called.

public ConformanceLevel ConformanceLevel { get; set; }

Gets or sets the level of conformance that the XML writer checks the XML output for.

public Encoding Encoding { get; set; }

Gets or sets the type of text encoding to use.

public bool Indent { get; set; }

Gets or sets a value indicating whether to indent elements.

public string IndentChars { get; set; }

Gets or sets the character string to use when indenting. This setting is used when the Indent property is set to true.

public NamespaceHandling NamespaceHandling { get; set; }

Gets or 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.

public string NewLineChars { get; set; }

Gets or sets the character string to use for line breaks.

public NewLineHandling NewLineHandling { get; set; }

Gets or sets a value indicating whether to normalize line breaks in the output.

public bool NewLineOnAttributes { get; set; }

Gets or sets a value indicating whether to write attributes on a new line.

public bool OmitXmlDeclaration { get; set; }

Gets or sets a value indicating whether to omit an XML declaration.

public bool WriteEndDocumentOnClose { get; set; }

Gets or sets a value that indicates whether the XmlWriter will add closing tags to all unclosed element tags when the Close method is called.

Initializes a new instance of the XmlWriterSettings class.

Creates a copy of the XmlWriterSettings instance.

public void Reset()

Resets the members of the settings class to their default values.