Documentation for this section has not yet been entered.
This property only applies to System.Xml.XmlWriter instances that output text content; otherwise, this setting is ignored.
If XmlWriterSettings.OmitXmlDeclaration is set to false, The XML declaration is written automatically
The XML declaration is always written if XmlWriterSettings.ConformanceLevel is set to ConformanceLevel.Document, even if XmlWriterSettings.OmitXmlDeclaration is set to true.
The XML declaration is never written if XmlWriterSettings.ConformanceLevel is set to ConformanceLevel.Fragment. You can call XmlWriter.WriteProcessingInstruction(string, string) to explicitly write out an XML declaration.