public class BasicNamespaceContext
extends java.lang.Object
implements javax.xml.namespace.NamespaceContext
NamespaceContext
interface.Modifier and Type | Field and Description |
---|---|
static java.lang.String |
XLINK_NS_PREFIX |
static java.lang.String |
XLINK_NS_URI |
Constructor and Description |
---|
BasicNamespaceContext()
Sole constructor for BasicNamespaceContext.
|
Modifier and Type | Method and Description |
---|---|
void |
addNamespace(java.lang.String prefix,
java.lang.String namespaceURI)
Adds a namepsace binding to this XML namespace context.
|
java.lang.String |
getNamespaceURI(java.lang.String prefix) |
java.lang.String |
getPrefix(java.lang.String namespaceURI) |
java.util.Iterator |
getPrefixes(java.lang.String namespaceURI) |
public static final java.lang.String XLINK_NS_PREFIX
public static final java.lang.String XLINK_NS_URI
public BasicNamespaceContext()
Prefix | URI |
---|---|
xml | http://www.w3.org/XML/1998/namespace |
xmlns | http://www.w3.org/2000/xmlns/ |
xlink | http://www.w3.org/1999/xlink |
public void addNamespace(java.lang.String prefix, java.lang.String namespaceURI)
prefix
- the namespace prefix.namespaceURI
- the namespace URI.java.lang.IllegalArgumentException
- if either the prefix or the namepsace URI are null.public java.lang.String getNamespaceURI(java.lang.String prefix)
getNamespaceURI
in interface javax.xml.namespace.NamespaceContext
public java.lang.String getPrefix(java.lang.String namespaceURI)
getPrefix
in interface javax.xml.namespace.NamespaceContext
public java.util.Iterator getPrefixes(java.lang.String namespaceURI)
getPrefixes
in interface javax.xml.namespace.NamespaceContext