Node namespace/prefix lookup API to that of NamespaceContext.
There are some differences:
| Function | NamespaceContext API |
Node API |
|---|---|---|
| Look up the prefix for a given namespace URI. | NamespaceContext#getPrefix(String) |
Node#lookupPrefix(String) |
| Look up all the prefixes for a given namespace URI. | NamespaceContext#getPrefixes(String) |
/ |
| Look up the namespace URI for a given prefix. | NamespaceContext#getNamespaceURI(String) |
Node#lookupNamespaceURI(String) |
| The default prefix. | javax. |
null |
| The default namespace URI. | javax. |
null |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public String | getNamespaceURI(String prefix)
Implements javax. Get Namespace URI bound to a prefix in the current scope. |
| public String | getPrefix(String namespaceURI)
Implements javax. Get prefix bound to Namespace URI in the current scope. |
| public Iterator | getPrefixes(String namespaceURI)
Implements javax. Throws |
| public void |
| context | back to summary |
|---|---|
| private Node context | |
| DOMNamespaceContext | back to summary |
|---|---|
| public DOMNamespaceContext(Node context) | |
| getNamespaceURI | back to summary | ||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| public String getNamespaceURI(String prefix) Implements javax. Doc from javax. 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:
| |||||||||||||||
| getPrefix | back to summary | ||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| public String getPrefix(String namespaceURI) Implements javax. Doc from javax. Get prefix bound to Namespace URI in the current scope. To get all prefixes bound to a Namespace URI in the current
scope, use When requesting a prefix by Namespace URI, the following table describes the returned prefix value for all Namespace URI values:
| |||||||||||||||
| getPrefixes | back to summary |
|---|---|
| public Iterator Implements javax. Throws
| |
| setContext | back to summary |
|---|---|
| public void setContext(Node context) | |