public class DefaultNamespaceContext extends Object implements NamespaceContext, NamespaceAware
NamespaceContext which uses a simple Map where
the keys are the prefixes and the values are the URIs| Constructor and Description |
|---|
DefaultNamespaceContext() |
DefaultNamespaceContext(NamespaceContext parent,
Map<String,String> map) |
DefaultNamespaceContext(XPathFactory factory) |
| Modifier and Type | Method and Description |
|---|---|
DefaultNamespaceContext |
add(String prefix,
String uri)
A helper method to make it easy to create newly populated instances
|
String |
getNamespaceURI(String prefix) |
String |
getPrefix(String namespaceURI) |
Iterator<String> |
getPrefixes(String namespaceURI) |
void |
setNamespaces(Map<String,String> namespaces)
Injects the XML Namespaces of prefix -> uri mappings
|
String |
toString()
toString() implementation that outputs the namespace mappings with the following format: "[me: {prefix -> value}, {prefix -> value}], [parent: {prefix -> value}, {prefix -> value}].
|
public DefaultNamespaceContext()
public DefaultNamespaceContext(XPathFactory factory)
public DefaultNamespaceContext(NamespaceContext parent, Map<String,String> map)
public DefaultNamespaceContext add(String prefix, String uri)
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 setNamespaces(Map<String,String> namespaces)
NamespaceAwaresetNamespaces in interface NamespaceAwarenamespaces - the XML namespaces with the key of prefixes and the value the URIsApache Camel