public interface NamespaceMap
extends java.lang.Iterable<java.lang.String>
NamespaceMap object is used store the namespaces
for an element. Each namespace added to this map can be added
with a prefix. A prefix is added only if the associated reference
has not been added to a parent element. If a parent element has
the associated reference, then the parents prefix is the one that
will be returned when requested from this map.| Modifier and Type | Method and Description |
|---|---|
java.lang.String |
getPrefix()
This is the prefix that is associated with the source element.
|
java.lang.String |
getPrefix(java.lang.String reference)
This acquires the prefix for the specified namespace reference.
|
java.lang.String |
getReference(java.lang.String prefix)
This acquires the namespace reference for the specified prefix.
|
java.util.Iterator<java.lang.String> |
iterator()
This returns an iterator for the namespace of all the nodes
in this
NamespaceMap. |
java.lang.String |
setReference(java.lang.String reference)
This is used to add the namespace reference to the namespace
map.
|
java.lang.String |
setReference(java.lang.String reference,
java.lang.String prefix)
This is used to add the namespace reference to the namespace
map.
|
java.lang.String getPrefix()
java.lang.String getPrefix(java.lang.String reference)
reference - the reference to find a matching prefix forjava.lang.String getReference(java.lang.String prefix)
prefix - the prefix to find a matching reference forjava.util.Iterator<java.lang.String> iterator()
NamespaceMap. This allows the namespaces
to be iterated within a for each loop in order to extract the
prefix values associated with the map.iterator in interface java.lang.Iterable<java.lang.String>java.lang.String setReference(java.lang.String reference)
reference - this is the reference to be addedjava.lang.String setReference(java.lang.String reference,
java.lang.String prefix)
reference - this is the reference to be addedprefix - this is the prefix to be added to the reference