public class SimpleNamespaceContext extends java.lang.Object implements NamespaceContext
Modifier and Type | Field and Description |
---|---|
static SimpleNamespaceContext |
EMPTY_CONTEXT
An empty context containing no prefixes at all.
|
Constructor and Description |
---|
SimpleNamespaceContext(java.util.Map prefixMap)
Creates a NamespaceContext backed by the given map.
|
Modifier and Type | Method and 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)
NamespaceContext
Unlike the method in javax.xml.namespace.NamespaceContext doesn't have to implement any special handling for predefined prefix values.
getNamespaceURI
in interface NamespaceContext
public java.util.Iterator getPrefixes()
NamespaceContext
getPrefixes
in interface NamespaceContext