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:
getNamespaceURI(prefix)
return value for specified prefixes
|
|
prefix parameter | Namespace URI return value |
DEFAULT_NS_PREFIX ("") |
default Namespace URI in the current scope or
when there is no default Namespace URI in the current scope |
bound prefix | Namespace URI bound to prefix in current scope |
unbound prefix |
|
XMLConstants.XML_NS_PREFIX ("xml") |
XMLConstants.XML_NS_URI
("http://www.w3.org/XML/1998/namespace") |
XMLConstants.XMLNS_ATTRIBUTE ("xmlns") |
XMLConstants.XMLNS_ATTRIBUTE_NS_URI
("http://www.w3.org/2000/xmlns/") |
null |
IllegalArgumentException is thrown |
prefix | prefix to look up |
IllegalArgumentException | When prefix is
null |
Diagram: Names, Values