public class NamespaceMappings
extends java.lang.Object
For example:
When the
| Constructor and Description |
|---|
NamespaceMappings()
Default constructor
|
| Modifier and Type | Method and Description |
|---|---|
java.lang.Object |
clone()
This method makes a clone of this object.
|
java.lang.String |
generateNextPrefix()
Generate a new namespace prefix ( ns0, ns1 ...) not used before
|
java.lang.String[] |
lookupAllPrefixes(java.lang.String uri)
Given a namespace uri, get all prefixes bound to the Namespace URI in the current scope.
|
java.lang.String |
lookupNamespace(java.lang.String prefix)
Use a namespace prefix to lookup a namespace URI.
|
java.lang.String |
lookupPrefix(java.lang.String uri)
Given a namespace uri, and the namespaces mappings for the
current element, return the current prefix for that uri.
|
boolean |
pushNamespace(java.lang.String prefix,
java.lang.String uri,
int elemDepth)
Declare a mapping of a prefix to namespace URI at the given element depth.
|
public NamespaceMappings()
Object.Object()public java.lang.String lookupNamespace(java.lang.String prefix)
prefix - String the prefix of the namespacepublic java.lang.String lookupPrefix(java.lang.String uri)
uri - the namespace URI to be search forpublic boolean pushNamespace(java.lang.String prefix,
java.lang.String uri,
int elemDepth)
prefix - a String with the prefix for a qualified nameuri - a String with the uri to which the prefix is to mapelemDepth - the depth of current declarationpublic java.lang.String generateNextPrefix()
public java.lang.Object clone()
throws java.lang.CloneNotSupportedException
clone in class java.lang.Objectjava.lang.CloneNotSupportedExceptionpublic java.lang.String[] lookupAllPrefixes(java.lang.String uri)
uri - the namespace URI to be search forCopyright © 2014 Apache XML Project. All Rights Reserved.