public class DOMUtil
extends java.lang.Object
Modifier | Constructor and Description |
---|---|
protected |
DOMUtil()
This class cannot be instantiated.
|
Modifier and Type | Method and Description |
---|---|
static void |
copyInto(org.w3c.dom.Node src,
org.w3c.dom.Node dest)
Copies the source tree into the specified place in a destination
tree.
|
static org.w3c.dom.DOMException |
createDOMException(short code,
java.lang.Throwable cause)
Creates a DOMException.
|
static org.w3c.dom.ls.LSException |
createLSException(short code,
java.lang.Throwable cause)
Creates an LSException.
|
static java.lang.String |
getAnnotation(org.w3c.dom.Node node) |
static org.w3c.dom.Attr |
getAttr(org.w3c.dom.Element elem,
java.lang.String name) |
static org.w3c.dom.Attr |
getAttrNS(org.w3c.dom.Element elem,
java.lang.String nsUri,
java.lang.String localName) |
static org.w3c.dom.Attr[] |
getAttrs(org.w3c.dom.Element elem) |
static java.lang.String |
getAttrValue(org.w3c.dom.Element elem,
java.lang.String name) |
static java.lang.String |
getAttrValueNS(org.w3c.dom.Element elem,
java.lang.String nsUri,
java.lang.String localName) |
static java.lang.String |
getChildText(org.w3c.dom.Node node)
Returns the concatenated child text of the specified node.
|
static org.w3c.dom.Document |
getDocument(org.w3c.dom.Node node) |
static org.w3c.dom.Element |
getFirstChildElement(org.w3c.dom.Node parent)
Finds and returns the first child element node.
|
static org.w3c.dom.Element |
getFirstChildElement(org.w3c.dom.Node parent,
java.lang.String elemName)
Finds and returns the first child node with the given name.
|
static org.w3c.dom.Element |
getFirstChildElement(org.w3c.dom.Node parent,
java.lang.String[] elemNames)
Finds and returns the first child node with the given name.
|
static org.w3c.dom.Element |
getFirstChildElement(org.w3c.dom.Node parent,
java.lang.String elemName,
java.lang.String attrName,
java.lang.String attrValue)
Finds and returns the first child node with the given name and
attribute name, value pair.
|
static org.w3c.dom.Element |
getFirstChildElementNS(org.w3c.dom.Node parent,
java.lang.String[][] elemNames)
Finds and returns the first child node with the given qualified name.
|
static org.w3c.dom.Element |
getFirstChildElementNS(org.w3c.dom.Node parent,
java.lang.String uri,
java.lang.String localpart)
Finds and returns the first child node with the given qualified name.
|
static org.w3c.dom.Element |
getFirstVisibleChildElement(org.w3c.dom.Node parent)
Finds and returns the first visible child element node.
|
static org.w3c.dom.Element |
getFirstVisibleChildElement(org.w3c.dom.Node parent,
java.util.Hashtable hiddenNodes)
Finds and returns the first visible child element node.
|
static org.w3c.dom.Element |
getLastChildElement(org.w3c.dom.Node parent)
Finds and returns the last child element node.
|
static org.w3c.dom.Element |
getLastChildElement(org.w3c.dom.Node parent,
java.lang.String elemName)
Finds and returns the last child node with the given name.
|
static org.w3c.dom.Element |
getLastChildElement(org.w3c.dom.Node parent,
java.lang.String[] elemNames)
Finds and returns the last child node with the given name.
|
static org.w3c.dom.Element |
getLastChildElement(org.w3c.dom.Node parent,
java.lang.String elemName,
java.lang.String attrName,
java.lang.String attrValue)
Finds and returns the last child node with the given name and
attribute name, value pair.
|
static org.w3c.dom.Element |
getLastChildElementNS(org.w3c.dom.Node parent,
java.lang.String[][] elemNames)
Finds and returns the last child node with the given qualified name.
|
static org.w3c.dom.Element |
getLastChildElementNS(org.w3c.dom.Node parent,
java.lang.String uri,
java.lang.String localpart)
Finds and returns the last child node with the given qualified name.
|
static org.w3c.dom.Element |
getLastVisibleChildElement(org.w3c.dom.Node parent)
Finds and returns the last visible child element node.
|
static org.w3c.dom.Element |
getLastVisibleChildElement(org.w3c.dom.Node parent,
java.util.Hashtable hiddenNodes)
Finds and returns the last visible child element node.
|
static java.lang.String |
getLocalName(org.w3c.dom.Node node)
returns local name of this element if not null, otherwise
returns the name of the node
|
static java.lang.String |
getName(org.w3c.dom.Node node) |
static java.lang.String |
getNamespaceURI(org.w3c.dom.Node node) |
static org.w3c.dom.Element |
getNextSiblingElement(org.w3c.dom.Node node)
Finds and returns the next sibling element node.
|
static org.w3c.dom.Element |
getNextSiblingElement(org.w3c.dom.Node node,
java.lang.String elemName)
Finds and returns the next sibling node with the given name.
|
static org.w3c.dom.Element |
getNextSiblingElement(org.w3c.dom.Node node,
java.lang.String[] elemNames)
Finds and returns the next sibling node with the given name.
|
static org.w3c.dom.Element |
getNextSiblingElement(org.w3c.dom.Node node,
java.lang.String elemName,
java.lang.String attrName,
java.lang.String attrValue)
Finds and returns the next sibling node with the given name and
attribute name, value pair.
|
static org.w3c.dom.Element |
getNextSiblingElementNS(org.w3c.dom.Node node,
java.lang.String[][] elemNames)
Finds and returns the next sibling node with the given qualified name.
|
static org.w3c.dom.Element |
getNextSiblingElementNS(org.w3c.dom.Node node,
java.lang.String uri,
java.lang.String localpart)
Finds and returns the next sibling node with the given qualified name.
|
static org.w3c.dom.Element |
getNextVisibleSiblingElement(org.w3c.dom.Node node) |
static org.w3c.dom.Element |
getNextVisibleSiblingElement(org.w3c.dom.Node node,
java.util.Hashtable hiddenNodes) |
static org.w3c.dom.Element |
getParent(org.w3c.dom.Element elem) |
static java.lang.String |
getPrefix(org.w3c.dom.Node node) |
static org.w3c.dom.Element |
getRoot(org.w3c.dom.Document doc) |
static java.lang.String |
getSyntheticAnnotation(org.w3c.dom.Node node) |
static java.lang.String |
getValue(org.w3c.dom.Attr attribute) |
static boolean |
isHidden(org.w3c.dom.Node node) |
static boolean |
isHidden(org.w3c.dom.Node node,
java.util.Hashtable hiddenNodes) |
static void |
setHidden(org.w3c.dom.Node node) |
static void |
setHidden(org.w3c.dom.Node node,
java.util.Hashtable hiddenNodes) |
static void |
setVisible(org.w3c.dom.Node node) |
static void |
setVisible(org.w3c.dom.Node node,
java.util.Hashtable hiddenNodes) |
public static void copyInto(org.w3c.dom.Node src, org.w3c.dom.Node dest) throws org.w3c.dom.DOMException
Note: This is an iterative implementation.
org.w3c.dom.DOMException
public static org.w3c.dom.Element getFirstChildElement(org.w3c.dom.Node parent)
public static org.w3c.dom.Element getFirstVisibleChildElement(org.w3c.dom.Node parent)
public static org.w3c.dom.Element getFirstVisibleChildElement(org.w3c.dom.Node parent, java.util.Hashtable hiddenNodes)
public static org.w3c.dom.Element getLastChildElement(org.w3c.dom.Node parent)
public static org.w3c.dom.Element getLastVisibleChildElement(org.w3c.dom.Node parent)
public static org.w3c.dom.Element getLastVisibleChildElement(org.w3c.dom.Node parent, java.util.Hashtable hiddenNodes)
public static org.w3c.dom.Element getNextSiblingElement(org.w3c.dom.Node node)
public static org.w3c.dom.Element getNextVisibleSiblingElement(org.w3c.dom.Node node)
public static org.w3c.dom.Element getNextVisibleSiblingElement(org.w3c.dom.Node node, java.util.Hashtable hiddenNodes)
public static void setHidden(org.w3c.dom.Node node)
public static void setHidden(org.w3c.dom.Node node, java.util.Hashtable hiddenNodes)
public static void setVisible(org.w3c.dom.Node node)
public static void setVisible(org.w3c.dom.Node node, java.util.Hashtable hiddenNodes)
public static boolean isHidden(org.w3c.dom.Node node)
public static boolean isHidden(org.w3c.dom.Node node, java.util.Hashtable hiddenNodes)
public static org.w3c.dom.Element getFirstChildElement(org.w3c.dom.Node parent, java.lang.String elemName)
public static org.w3c.dom.Element getLastChildElement(org.w3c.dom.Node parent, java.lang.String elemName)
public static org.w3c.dom.Element getNextSiblingElement(org.w3c.dom.Node node, java.lang.String elemName)
public static org.w3c.dom.Element getFirstChildElementNS(org.w3c.dom.Node parent, java.lang.String uri, java.lang.String localpart)
public static org.w3c.dom.Element getLastChildElementNS(org.w3c.dom.Node parent, java.lang.String uri, java.lang.String localpart)
public static org.w3c.dom.Element getNextSiblingElementNS(org.w3c.dom.Node node, java.lang.String uri, java.lang.String localpart)
public static org.w3c.dom.Element getFirstChildElement(org.w3c.dom.Node parent, java.lang.String[] elemNames)
public static org.w3c.dom.Element getLastChildElement(org.w3c.dom.Node parent, java.lang.String[] elemNames)
public static org.w3c.dom.Element getNextSiblingElement(org.w3c.dom.Node node, java.lang.String[] elemNames)
public static org.w3c.dom.Element getFirstChildElementNS(org.w3c.dom.Node parent, java.lang.String[][] elemNames)
public static org.w3c.dom.Element getLastChildElementNS(org.w3c.dom.Node parent, java.lang.String[][] elemNames)
public static org.w3c.dom.Element getNextSiblingElementNS(org.w3c.dom.Node node, java.lang.String[][] elemNames)
public static org.w3c.dom.Element getFirstChildElement(org.w3c.dom.Node parent, java.lang.String elemName, java.lang.String attrName, java.lang.String attrValue)
public static org.w3c.dom.Element getLastChildElement(org.w3c.dom.Node parent, java.lang.String elemName, java.lang.String attrName, java.lang.String attrValue)
public static org.w3c.dom.Element getNextSiblingElement(org.w3c.dom.Node node, java.lang.String elemName, java.lang.String attrName, java.lang.String attrValue)
public static java.lang.String getChildText(org.w3c.dom.Node node)
Node.TEXT_NODE
or the children of any child
node that is of type Node.CDATA_SECTION_NODE
for the concatenation.node
- The node to look at.public static java.lang.String getName(org.w3c.dom.Node node)
public static java.lang.String getLocalName(org.w3c.dom.Node node)
public static org.w3c.dom.Element getParent(org.w3c.dom.Element elem)
public static org.w3c.dom.Document getDocument(org.w3c.dom.Node node)
public static org.w3c.dom.Element getRoot(org.w3c.dom.Document doc)
public static org.w3c.dom.Attr getAttr(org.w3c.dom.Element elem, java.lang.String name)
public static org.w3c.dom.Attr getAttrNS(org.w3c.dom.Element elem, java.lang.String nsUri, java.lang.String localName)
public static org.w3c.dom.Attr[] getAttrs(org.w3c.dom.Element elem)
public static java.lang.String getValue(org.w3c.dom.Attr attribute)
public static java.lang.String getAttrValue(org.w3c.dom.Element elem, java.lang.String name)
public static java.lang.String getAttrValueNS(org.w3c.dom.Element elem, java.lang.String nsUri, java.lang.String localName)
public static java.lang.String getPrefix(org.w3c.dom.Node node)
public static java.lang.String getNamespaceURI(org.w3c.dom.Node node)
public static java.lang.String getAnnotation(org.w3c.dom.Node node)
public static java.lang.String getSyntheticAnnotation(org.w3c.dom.Node node)
public static org.w3c.dom.DOMException createDOMException(short code, java.lang.Throwable cause)
public static org.w3c.dom.ls.LSException createLSException(short code, java.lang.Throwable cause)
Copyright © 1999-2022 The Apache Software Foundation. All Rights Reserved.