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)
Binds the given namespace as default namespace.
|
void |
bindNamespaceUri(java.lang.String prefix,
java.lang.String namespaceUri)
Binds the given prefix to the given namespace.
|
void |
clear()
Removes all declared prefixes.
|
java.util.Iterator<java.lang.String> |
getBoundPrefixes()
Returns all declared prefixes.
|
java.lang.String |
getNamespaceURI(java.lang.String prefix) |
java.lang.String |
getPrefix(java.lang.String namespaceUri) |
java.util.Iterator |
getPrefixes(java.lang.String namespaceUri) |
void |
removeBinding(java.lang.String prefix)
Removes the given prefix from this context.
|
void |
setBindings(java.util.Map<java.lang.String,java.lang.String> bindings)
Sets 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 getPrefixes(java.lang.String namespaceUri)
getPrefixes
in interface NamespaceContext
public void setBindings(java.util.Map<java.lang.String,java.lang.String> bindings)
bindings
- the bindingspublic 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 clear()
public java.util.Iterator<java.lang.String> getBoundPrefixes()
public void removeBinding(java.lang.String prefix)
prefix
- the prefix to be removed