Name

NamespaceContext

Synopsis

This interface represents a mapping between namespace URIs and the local prefixes that are bound to them. Use getNamepaceURI( ) to obtain the URI that a prefix is bound to. Use getPrefix( ) to do the reverse. More than one prefix can be bound to the same URI, and the getPrefixes( ) method returns an Iterator that you can use to loop through all prefixes that have been associated with a given URI.

public interface NamespaceContext {
// Public Instance Methods
     String getNamespaceURI(String prefix);  
     String getPrefix(String namespaceURI);  
     java.util.Iterator getPrefixes(String namespaceURI);  
}

Passed To

javax.xml.xpath.XPath.setNamespaceContext( )

Returned By

javax.xml.xpath.XPath.getNamespaceContext( )

Get Java in a Nutshell, 5th Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.