Type Reason ArgumentException prefix is "xml" or "xmlns". ArgumentNullException prefix is null, or uri is null.
System.Xml.XmlNamespaceManager does not check prefix and uri for conformance.
System.Xml.XmlReader checks names, including prefixes and namespaces, to ensure they are valid XML names according to the World Wide Web Consortium (W3C) tp://www.w3.org/TR/REC-xml-names/. System.Xml.XmlNamespaceManager is used internally by System.Xml.XmlReader, so to avoid a duplication of efforts, System.Xml.XmlNamespaceManager assumes all prefixes and namespaces are valid.
If the prefix and namespace already exist within the current scope, the new prefix and namespace pair will replace the existing prefix/namespace combination. The same prefix and namespace combination can exist across different scopes.
The following prefix/namespace pairs are added by default to the System.Xml.XmlNamespaceManager. They can be determined at any scope.
xmlns |
http://www.w3.org/2000/xmlns/ (the xmlns prefix namespace) |
xml |
http://www.w3.org/XML/1998/namespace (the XML namespace) |
String.Empty |
String.Empty (the empty namespace). This value can be reassigned a different prefix. For example, xmlns="" defines the default namespace to be the empty namespace |