public class SimpleNamespaceContext extends java.lang.Object implements NamespaceContext
javax.xml.namespace.NamespaceContext
implementation.
Follows the standard NamespaceContext
contract, and is loadable
via a java.util.Map
or java.util.Properties
objectConstructor and Description |
---|
SimpleNamespaceContext() |
Modifier and Type | Method and Description |
---|---|
void |
bindDefaultNamespaceUri(java.lang.String namespaceUri)
Bind the given namespace as default namespace.
|
void |
bindNamespaceUri(java.lang.String prefix,
java.lang.String namespaceUri)
Bind the given prefix to the given namespace.
|
void |
clear()
Remove all declared prefixes.
|
java.util.Iterator<java.lang.String> |
getBoundPrefixes()
Return all declared prefixes.
|
java.lang.String |
getNamespaceURI(java.lang.String prefix) |
java.lang.String |
getPrefix(java.lang.String namespaceUri) |
java.util.Iterator<java.lang.String> |
getPrefixes(java.lang.String namespaceUri) |
void |
removeBinding(java.lang.String prefix)
Remove the given prefix from this context.
|
void |
setBindings(java.util.Map<java.lang.String,java.lang.String> bindings)
Set the bindings for this namespace context.
|
public java.lang.String getNamespaceURI(java.lang.String prefix)
getNamespaceURI
in interface NamespaceContext
public java.lang.String getPrefix(java.lang.String namespaceUri)
getPrefix
in interface NamespaceContext
public java.util.Iterator<java.lang.String> getPrefixes(java.lang.String namespaceUri)
getPrefixes
in interface NamespaceContext
public void setBindings(java.util.Map<java.lang.String,java.lang.String> bindings)
public void bindDefaultNamespaceUri(java.lang.String namespaceUri)
namespaceUri
- the namespace uripublic void bindNamespaceUri(java.lang.String prefix, java.lang.String namespaceUri)
prefix
- the namespace prefixnamespaceUri
- the namespace uripublic void removeBinding(java.lang.String prefix)
prefix
- the prefix to be removedpublic void clear()
public java.util.Iterator<java.lang.String> getBoundPrefixes()