<PackageReference Include="System.Xml.XmlDocument" Version="4.0.1-beta-23409" />

XmlDeclaration

public class XmlDeclaration : XmlLinkedNode
Represents the XML declaration node <?xml version='1.0'...?>.
public string Encoding { get; set; }

Gets or sets the encoding level of the XML document.

public string Standalone { get; set; }

Gets or sets the value of the standalone attribute.

public string Version { get; }

Gets the XML version of the document.