public class NSContext extends Object implements NamespaceContext, Cloneable
NamespaceContext interface.| Constructor and Description |
|---|
NSContext()
Creates a new object.
|
NSContext(String prefix,
String uri)
Creates a new context object and add one namespace to it.
|
| Modifier and Type | Method and Description |
|---|---|
NSContext |
clone() |
boolean |
containsPair(String prefix,
String uri)
Indicates if this context has a given namespace URI associated with a given prefix.
|
String |
getNamespaceURI(String prefix) |
String |
getPrefix(String uri) |
Iterator<String> |
getPrefixes(String uri) |
void |
put(String prefix,
String uri)
Sets a prefix/uri pair to this context.
|
String |
toString() |
public String getNamespaceURI(String prefix)
getNamespaceURI in interface NamespaceContextpublic String getPrefix(String uri)
getPrefix in interface NamespaceContextpublic Iterator<String> getPrefixes(String uri)
getPrefixes in interface NamespaceContextpublic void put(String prefix, String uri)
prefix - the prefix of the namespace.uri - the URI of the namespace.Copyright © 2020. All rights reserved.