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 Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
bindDefaultNamespaceUri
(String namespaceUri) Bind the given namespace as default namespace.void
bindNamespaceUri
(String prefix, String namespaceUri) Bind the given prefix to the given namespace.void
clear()
Remove all declared prefixes.Return all declared prefixes.getNamespaceURI
(String prefix) getPrefixes
(String namespaceUri) void
removeBinding
(@Nullable String prefix) Remove the given prefix from this context.void
setBindings
(Map<String, String> bindings) Set the bindings for this namespace context.
-
Constructor Details
-
SimpleNamespaceContext
public SimpleNamespaceContext()
-
-
Method Details
-
getNamespaceURI
- Specified by:
getNamespaceURI
in interfaceNamespaceContext
-
getPrefix
- Specified by:
getPrefix
in interfaceNamespaceContext
-
getPrefixes
- Specified by:
getPrefixes
in interfaceNamespaceContext
-
setBindings
-
bindDefaultNamespaceUri
Bind the given namespace as default namespace.- Parameters:
namespaceUri
- the namespace uri
-
bindNamespaceUri
-
removeBinding
-
clear
public void clear()Remove all declared prefixes. -
getBoundPrefixes
-