NamespaceContextpublic class SimpleNamespaceContext extends java.lang.Object implements NamespaceContext
| Modifier and Type | Field | Description |
|---|---|---|
static SimpleNamespaceContext |
EMPTY_CONTEXT |
An empty context containing no prefixes at all.
|
| Constructor | Description |
|---|---|
SimpleNamespaceContext(java.util.Map prefixMap) |
Creates a NamespaceContext backed by the given map.
|
| Modifier and Type | Method | Description |
|---|---|---|
java.lang.String |
getNamespaceURI(java.lang.String prefix) |
Obtain the URI for a given prefix.
|
java.util.Iterator |
getPrefixes() |
Get all prefixes of this context.
|
public static final SimpleNamespaceContext EMPTY_CONTEXT
public SimpleNamespaceContext(java.util.Map prefixMap)
Copies the map, changes made to the given map after calling the constructor are not reflected into the NamespaceContext.
prefixMap - maps prefix to Namespace URIpublic java.lang.String getNamespaceURI(java.lang.String prefix)
NamespaceContextUnlike the method in javax.xml.namespace.NamespaceContext doesn't have to implement any special handling for predefined prefix values.
getNamespaceURI in interface NamespaceContextpublic java.util.Iterator getPrefixes()
NamespaceContextgetPrefixes in interface NamespaceContext