Finds the prefix declared for the given namespace URI.
Public Overridable Function LookupPrefix ( _ uri As String _ ) As String
Dim instance As XmlNamespaceManager Dim uri As String Dim returnValue As String returnValue = instance.LookupPrefix(uri)
public virtual string LookupPrefix( string uri )
public: virtual String^ LookupPrefix( String^ uri )
public function LookupPrefix( uri : String ) : String
This method finds the mapped prefix by walking the stack (that is, it looks globally). The supplied string must be atomized for the lookup to succeed. In other words, the supplied string object must exist in the XmlNamespaceManager's NameTable.
The returned string is also atomized. For more information on atomized strings, see XmlNameTable.
The following example removes a namespace from the namespace manager.
Dim prefix As String = nsmgr.LookupPrefix("www.wideworldimporters.com/europe") nsmgr.RemoveNamespace(prefix, "www.wideworldimporters.com/europe")
String prefix = nsmgr.LookupPrefix("www.wideworldimporters.com/europe"); nsmgr.RemoveNamespace(prefix, "www.wideworldimporters.com/europe");
String^ prefix = nsmgr->LookupPrefix( "www.wideworldimporters.com/europe" ); nsmgr->RemoveNamespace( prefix, "www.wideworldimporters.com/europe" );
String* prefix = nsmgr->LookupPrefix(S"www.wideworldimporters.com/europe"); nsmgr->RemoveNamespace(prefix, S"www.wideworldimporters.com/europe");
Windows 7, Windows Vista, Windows XP SP2, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP Starter Edition, Windows Server 2008 R2, Windows Server 2008, Windows Server 2003, Windows Server 2000 SP4, Windows Millennium Edition, Windows 98, Windows CE, Windows Mobile for Smartphone, Windows Mobile for Pocket PC, Xbox 360, Zune