<PackageReference Include="System.Configuration.ConfigurationManager" Version="9.0.0-preview.3.24172.9" />

ConfigXmlDocument

Wraps the corresponding XmlDocument type and also carries the necessary information for reporting file-name and line numbers.
public string Filename { get; }

Gets the configuration file name.

public int LineNumber { get; }

Gets the current node line number.

Initializes a new instance of the ConfigXmlDocument class.

public void LoadSingleElement(string filename, XmlTextReader sourceReader)

Loads a single configuration element.