XmlNamespaceManager xmlnsManager = new XmlNamespaceManager(new NameTable()); xmlnsManager.AddNamespace("ns", "http://www.example.com/namespace");
string uri = xmlnsManager.LookupNamespace("ns");
string prefix = xmlnsManager.LookupPrefix("http://www.example.com/namespace");These examples demonstrate how to use XmlNamespaceManager to manage namespaces in XML documents. The package library is included in the .NET Framework and can be found in the System.Xml namespace.