The OmitXmlDeclaration property gets or sets a value indicating whether to omit an XML declaration.The NewLineOnAttributes property gets or sets a value indicating whether to write attributes on a new line.The NewLineHandling property gets or sets a value indicating whether to normalize line breaks in the output.The NewLineChars property gets or sets the character string to use for line breaks.The default behavior is for the writer to output all namespace declarations that are present in the writer's namespace resolver. The NamespaceHanding property gets or sets a value that indicates whether the XmlWriter should remove duplicate namespace declarations when writing XML content.This setting is used when the Indent property is set to true. The IndentChars property gets or sets the character string to use when indenting.The Indent property gets or sets a value indicating whether to indent elements.The Encoding property gets or sets the type of text encoding to use. You may overwrite the default encoding of an XML document.The DoNotEscapeUriAttribute property gets or sets a value that indicates whether the XmlWriter does not escape URI attributes.The ConformanceLevel property gets or sets the level of conformance that the XmlWriter complies with.The CloseOutput property gets or sets a value indicating whether the XmlWriter should also close the underlying stream when the Close method is called.
The CheckCharacters property gets or sets a value indicating whether to do character checking.I know it looks and reads like a lot of documentation but if you want to write good XML, you must understand the XmlWritersSettings properties. Let's take a quick look at the XmlWriterSettings class properties.