org.apache.xml.resolver.helpers
public class Namespaces extends Object
This class defines a set of static methods that can be called to analyze the namespace properties of DOM nodes.
Version: 1.0
Method Summary | |
---|---|
static String | getLocalName(Element element)
Returns the "localname" part of a QName, which is the whole
name if it has no prefix.
|
static String | getNamespaceURI(Node node, String prefix)
Returns the namespace URI for the specified prefix at the
specified context node.
|
static String | getNamespaceURI(Element element)
Returns the namespace URI for the namespace to which the
element belongs.
|
static String | getPrefix(Element element)
Returns the "prefix" part of a QName or the empty string (not
null) if the name has no prefix.
|
Parameters: element The QName of an element.
Returns: The local part of a QName.
Parameters: node The context node. prefix The prefix.
Returns: The namespace URI associated with the prefix, or null if no namespace declaration exists for the prefix.
Parameters: element The element.
Returns: The namespace URI associated with the namespace of the element, or null if no namespace declaration exists for it.
Parameters: element The QName of an element.
Returns: The prefix part of the element name.