org.apache.xml.resolver.helpers
public class Namespaces extends java.lang.Object
This class defines a set of static methods that can be called to analyze the namespace properties of DOM nodes.
Constructor and Description |
---|
Namespaces() |
Modifier and Type | Method and Description |
---|---|
static java.lang.String |
getLocalName(org.w3c.dom.Element element)
Returns the "localname" part of a QName, which is the whole
name if it has no prefix.
|
static java.lang.String |
getNamespaceURI(org.w3c.dom.Element element)
Returns the namespace URI for the namespace to which the
element belongs.
|
static java.lang.String |
getNamespaceURI(org.w3c.dom.Node node,
java.lang.String prefix)
Returns the namespace URI for the specified prefix at the
specified context node.
|
static java.lang.String |
getPrefix(org.w3c.dom.Element element)
Returns the "prefix" part of a QName or the empty string (not
null) if the name has no prefix.
|
public static java.lang.String getPrefix(org.w3c.dom.Element element)
element
- The QName of an element.public static java.lang.String getLocalName(org.w3c.dom.Element element)
element
- The QName of an element.public static java.lang.String getNamespaceURI(org.w3c.dom.Node node, java.lang.String prefix)
node
- The context node.prefix
- The prefix.public static java.lang.String getNamespaceURI(org.w3c.dom.Element element)
element
- The element.Copyright ? 2001-2003 Apache Software Foundation. All Rights Reserved.