public class SimpleNamespaceContext extends Object implements NamespaceContext
| Modifier and Type | Field and Description |
|---|---|
static SimpleNamespaceContext |
EMPTY_CONTEXT
An empty context containing no prefixes at all.
|
| Constructor and Description |
|---|
SimpleNamespaceContext(Map prefixMap)
Creates a NamespaceContext backed by the given map.
|
| Modifier and Type | Method and Description |
|---|---|
String |
getNamespaceURI(String prefix)
Obtain the URI for a given prefix.
|
Iterator<String> |
getPrefixes()
Get all prefixes of this context.
|
public static final SimpleNamespaceContext EMPTY_CONTEXT
public SimpleNamespaceContext(Map prefixMap)
Copies the map, changes made to the given map after calling the constructor are not reflected into the NamespaceContext.
prefixMap - maps prefix to Namespace URIpublic String getNamespaceURI(String prefix)
NamespaceContextUnlike the method in javax.xml.namespace.NamespaceContext doesn't have to implement any special handling for predefined prefix values.
getNamespaceURI in interface NamespaceContextpublic Iterator<String> getPrefixes()
NamespaceContextgetPrefixes in interface NamespaceContextCopyright © 2001–2022 XMLUnit. All rights reserved.