Package org.springframework.util.xml
Class SimpleNamespaceContext
java.lang.Object
org.springframework.util.xml.SimpleNamespaceContext
- All Implemented Interfaces:
- NamespaceContext
Simple 
javax.xml.namespace.NamespaceContext implementation.
 Follows the standard NamespaceContext contract, and is loadable
 via a java.util.Map or java.util.Properties object- Since:
- 3.0
- Author:
- Arjen Poutsma, Juergen Hoeller
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionvoidbindDefaultNamespaceUri(String namespaceUri) Bind the given namespace as default namespace.voidbindNamespaceUri(String prefix, String namespaceUri) Bind the given prefix to the given namespace.voidclear()Remove all declared prefixes.Return all declared prefixes.getNamespaceURI(String prefix) getPrefixes(String namespaceUri) voidremoveBinding(String prefix) Remove the given prefix from this context.voidsetBindings(Map<String, String> bindings) Set the bindings for this namespace context.
- 
Constructor Details- 
SimpleNamespaceContextpublic SimpleNamespaceContext()
 
- 
- 
Method Details- 
getNamespaceURI- Specified by:
- getNamespaceURIin interface- NamespaceContext
 
- 
getPrefix- Specified by:
- getPrefixin interface- NamespaceContext
 
- 
getPrefixes- Specified by:
- getPrefixesin interface- NamespaceContext
 
- 
setBindingsSet the bindings for this namespace context. The supplied map must consist of string key value pairs.
- 
bindDefaultNamespaceUriBind the given namespace as default namespace.- Parameters:
- namespaceUri- the namespace uri
 
- 
bindNamespaceUriBind the given prefix to the given namespace.- Parameters:
- prefix- the namespace prefix
- namespaceUri- the namespace URI
 
- 
removeBindingRemove the given prefix from this context.- Parameters:
- prefix- the prefix to be removed
 
- 
clearpublic void clear()Remove all declared prefixes.
- 
getBoundPrefixesReturn all declared prefixes.
 
-