INamespaceContext.GetNamespaceURI(String) Method

Definition

Get Namespace URI bound to a prefix in the current scope.

[Android.Runtime.Register("getNamespaceURI", "(Ljava/lang/String;)Ljava/lang/String;", "GetGetNamespaceURI_Ljava_lang_String_Handler:Javax.Xml.Namespace.INamespaceContextInvoker, Mono.Android, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null")]
public string? GetNamespaceURI (string? prefix);
[<Android.Runtime.Register("getNamespaceURI", "(Ljava/lang/String;)Ljava/lang/String;", "GetGetNamespaceURI_Ljava_lang_String_Handler:Javax.Xml.Namespace.INamespaceContextInvoker, Mono.Android, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null")>]
abstract member GetNamespaceURI : string -> string

Parameters

prefix
String

prefix to look up

Returns

Namespace URI bound to prefix in the current scope

Attributes

Remarks

Get Namespace URI bound to a prefix in the current scope.

When requesting a Namespace URI by prefix, the following table describes the returned Namespace URI value for all possible prefix values:

<table border="2" rules="all" cellpadding="4"> <thead> <tr> <td align="center" colspan="2"> getNamespaceURI(prefix) return value for specified prefixes </td> </tr> <tr> <td>prefix parameter</td> <td>Namespace URI return value</td> </tr> </thead> <tbody> <tr> <td>DEFAULT_NS_PREFIX ("")</td> <td>default Namespace URI in the current scope or {@link javax.xml.XMLConstants#NULL_NS_URI XMLConstants.NULL_NS_URI("")} when there is no default Namespace URI in the current scope</td> </tr> <tr> <td>bound prefix</td> <td>Namespace URI bound to prefix in current scope</td> </tr> <tr> <td>unbound prefix</td> <td>{@link javax.xml.XMLConstants#NULL_NS_URI XMLConstants.NULL_NS_URI("")}</td> </tr> <tr> <td>XMLConstants.XML_NS_PREFIX ("xml")</td> <td>XMLConstants.XML_NS_URI ("http://www.w3.org/XML/1998/namespace")</td> </tr> <tr> <td>XMLConstants.XMLNS_ATTRIBUTE ("xmlns")</td> <td>XMLConstants.XMLNS_ATTRIBUTE_NS_URI ("http://www.w3.org/2000/xmlns/")</td> </tr> <tr> <td>null</td> <td>IllegalArgumentException is thrown</td> </tr> </tbody> </table>

Java documentation for javax.xml.namespace.NamespaceContext.getNamespaceURI(java.lang.String).

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Applies to