public class SimpleNamespaceContext extends 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 object| Constructor and Description |
|---|
SimpleNamespaceContext() |
| Modifier and Type | Method and Description |
|---|---|
void |
bindDefaultNamespaceUri(String namespaceUri)
Binds the given namespace as default namespace.
|
void |
bindNamespaceUri(String prefix,
String namespaceUri)
Binds the given prefix to the given namespace.
|
void |
clear()
Removes all declared prefixes.
|
Iterator<String> |
getBoundPrefixes()
Returns all declared prefixes.
|
String |
getNamespaceURI(String prefix) |
String |
getPrefix(String namespaceUri) |
Iterator<String> |
getPrefixes(String namespaceUri) |
boolean |
hasBinding(String prefix) |
void |
removeBinding(String prefix)
Removes the given prefix from this context.
|
void |
setBindings(Map<String,String> bindings)
Sets the bindings for this namespace context.
|
public String getNamespaceURI(String prefix)
getNamespaceURI in interface NamespaceContextpublic String getPrefix(String namespaceUri)
getPrefix in interface NamespaceContextpublic Iterator<String> getPrefixes(String namespaceUri)
getPrefixes in interface NamespaceContextpublic void setBindings(Map<String,String> bindings)
bindings - the bindingspublic void bindDefaultNamespaceUri(String namespaceUri)
namespaceUri - the namespace uripublic void bindNamespaceUri(String prefix, String namespaceUri)
prefix - the namespace prefixnamespaceUri - the namespace uripublic void clear()
public Iterator<String> getBoundPrefixes()
public void removeBinding(String prefix)
prefix - the prefix to be removedpublic boolean hasBinding(String prefix)