The namespace URI to which the prefix maps or null if no matching prefix is found.
Type Reason ArgumentNullException The XmlTextReader.Namespaces property of the current instance is true and prefix is null.
In the dnprdnext release, the recommended practice is to create System.Xml.XmlReader instances using the erload:System.Xml.XmlReader.Create method. This allows you to take full advantage of the new features introduced in this release. For more information, see Creating XML Readers.
In the following XML, if the reader is positioned on the href attribute, the prefix a is resolved by calling reader.LookupNamespace("a"). The returned string is urn:456.
Example
<root xmlns:a="urn:456"> <item> <ref href="a:b"/> </item> </root>