public class DOMNamespaceContext extends Object implements NamespaceContext
Node
namespace/prefix lookup API to that of NamespaceContext
.
There are some differences:
Function | NamespaceContext API |
Node API |
---|---|---|
Look up the prefix for a given namespace URI. | NamespaceContext.getPrefix(String) |
Node.lookupPrefix(String) |
Look up all the prefixes for a given namespace URI. | NamespaceContext.getPrefixes(String) |
/ |
Look up the namespace URI for a given prefix. | NamespaceContext.getNamespaceURI(String) |
Node.lookupNamespaceURI(String) |
The default prefix. | XMLConstants.DEFAULT_NS_PREFIX |
null |
The default namespace URI. | XMLConstants.NULL_NS_URI |
null |
Constructor and Description |
---|
DOMNamespaceContext(Node context) |
Modifier and Type | Method and Description |
---|---|
String |
getNamespaceURI(String prefix) |
String |
getPrefix(String namespaceURI) |
Iterator<String> |
getPrefixes(String namespaceURI)
Throws
UnsupportedOperationException . |
void |
setContext(Node context) |
public DOMNamespaceContext(Node context)
public void setContext(Node context)
public String getNamespaceURI(String prefix)
getNamespaceURI
in interface NamespaceContext
public String getPrefix(String namespaceURI)
getPrefix
in interface NamespaceContext
public Iterator<String> getPrefixes(String namespaceURI)
UnsupportedOperationException
.getPrefixes
in interface NamespaceContext
Copyright © 2000–2020 The Apache Software Foundation. All rights reserved.