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

XmlNamespaceManager

Resolves, adds, and removes namespaces to a collection and provides scope management for these namespaces.
public virtual string DefaultNamespace { get; }

Gets the namespace URI for the default namespace.

public virtual XmlNameTable NameTable { get; }

Gets the XmlNameTable associated with this object.

Initializes a new instance of the XmlNamespaceManager class with the specified XmlNameTable.

public virtual void AddNamespace(string prefix, string uri)

Adds the given namespace to the collection.

public virtual IEnumerator GetEnumerator()

Returns an enumerator to use to iterate through the namespaces in the XmlNamespaceManager.

public virtual IDictionary<string, string> GetNamespacesInScope(XmlNamespaceScope scope)

Gets a collection of namespace names keyed by prefix which can be used to enumerate the namespaces currently in scope.

public virtual bool HasNamespace(string prefix)

Gets a value indicating whether the supplied prefix has a namespace defined for the current pushed scope.

public virtual string LookupNamespace(string prefix)

Gets the namespace URI for the specified prefix.

public virtual string LookupPrefix(string uri)

Finds the prefix declared for the given namespace URI.

public virtual bool PopScope()

Pops a namespace scope off the stack.

public virtual void PushScope()

Pushes a namespace scope onto the stack.

public virtual void RemoveNamespace(string prefix, string uri)

Removes the given namespace for the given prefix.