- java.lang.Object
-
- org.apache.xml.security.utils.DOMNamespaceContext
-
- All Implemented Interfaces:
NamespaceContext
public class DOMNamespaceContext extends Object implements NamespaceContext
This class adapts theNodenamespace/prefix lookup API to that ofNamespaceContext. There are some differences:Function NamespaceContextAPINodeAPILook 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_PREFIXnullThe default namespace URI. XMLConstants.NULL_NS_URInull
-
-
Constructor Summary
Constructors Constructor Description DOMNamespaceContext(Node context)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description StringgetNamespaceURI(String prefix)StringgetPrefix(String namespaceURI)Iterator<String>getPrefixes(String namespaceURI)ThrowsUnsupportedOperationException.voidsetContext(Node context)
-
-
-
Constructor Detail
-
DOMNamespaceContext
public DOMNamespaceContext(Node context)
-
-
Method Detail
-
setContext
public void setContext(Node context)
-
getNamespaceURI
public String getNamespaceURI(String prefix)
- Specified by:
getNamespaceURIin interfaceNamespaceContext
-
getPrefix
public String getPrefix(String namespaceURI)
- Specified by:
getPrefixin interfaceNamespaceContext
-
getPrefixes
public Iterator<String> getPrefixes(String namespaceURI)
ThrowsUnsupportedOperationException.- Specified by:
getPrefixesin interfaceNamespaceContext
-
-