|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjd.xml.util.DomUtil
A collection of utility functions to support DOM handling.
Constructor Summary | |
DomUtil()
|
Method Summary | |
static Node |
getFirstSibling(Node node)
Return the first sibling of the given node. |
static Attr |
getInheritedAttribute(Node node,
String namespaceUri,
String name)
Return an attribute, that is declared for the given node or one of its ancestors. |
static String |
getNamespaceUri(Node node,
String prefix)
Return the namespace uri for a given prefix. |
static int |
getNodeLevel(Node node)
Return the node level. |
static Node |
getParentOrOwner(Node node)
Return the parent of the node or the owner element (if it is an Attribute). |
static boolean |
getPreserveXmlSpace(Node node)
Test if the value of the inherited attribute xml:space equals "preserve". |
static String |
getXmlBaseUri(Node node,
String documentBaseUri)
Return the value of the inherited attribute xml:base for the given node. |
static String |
getXmlLanguage(Node node)
Return the value of the inherited attribute xml:base for the given node. |
static boolean |
isNamespaceNode(Node attribute)
Test if an attribute is a namespace node. |
static boolean |
isNamespaceNode(String name)
Test if an attribute with the given name is a namespace node. |
static void |
stripWhitespace(Document doc)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public DomUtil()
Method Detail |
public static Node getParentOrOwner(Node node)
public static Attr getInheritedAttribute(Node node, String namespaceUri, String name)
node
- the nodenamespaceUri
- the namespace uri of the attribute or nullname
- the attribute name or local name if namespaceUri is not null
public static String getXmlBaseUri(Node node, String documentBaseUri)
public static String getXmlLanguage(Node node)
public static boolean getPreserveXmlSpace(Node node)
public static Node getFirstSibling(Node node)
public static int getNodeLevel(Node node)
public static boolean isNamespaceNode(Node attribute)
public static boolean isNamespaceNode(String name)
public static String getNamespaceUri(Node node, String prefix)
public static void stripWhitespace(Document doc)
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |