Resolves a namespace prefix in the current element's scope.
[Visual Basic] MustOverride Public Function LookupNamespace( _ ByVal prefix As String _ ) As String [C#] public abstract string LookupNamespace( string prefix ); [C++] public: virtual String* LookupNamespace( String* prefix ) = 0; [JScript] public abstract function LookupNamespace( prefix : String ) : String;
The namespace URN that the prefix maps to. a null reference (in Visual Basic Nothing) if no matching prefix is found.
For example, suppose you have the following XML:
<root xmlns:a="urn:456"> <item> <ref href="a:b"/> </item> </root>
When you read the href attribute with the value "a:b", you can resolve the prefix "a" by calling LookupNamespace ("a"). The returned string will be "urn:456".
XmlReader Class | XmlReader Members | System.NewXml Namespace