public class DOMNodeHelper
extends java.lang.Object
DOMNodeHelper
contains a collection of utility methods for use
across Node implementations.
Modifier and Type | Class and Description |
---|---|
static class |
DOMNodeHelper.EmptyNodeList |
Modifier and Type | Field and Description |
---|---|
static org.w3c.dom.NodeList |
EMPTY_NODE_LIST |
Modifier | Constructor and Description |
---|---|
protected |
DOMNodeHelper() |
Modifier and Type | Method and Description |
---|---|
static org.w3c.dom.Node |
appendChild(Node node,
org.w3c.dom.Node newChild) |
static void |
appendData(CharacterData charData,
java.lang.String arg) |
static void |
appendElementsByTagName(java.util.List<? super Element> list,
Branch parent,
java.lang.String name) |
static void |
appendElementsByTagNameNS(java.util.List<? super Element> list,
Branch parent,
java.lang.String namespace,
java.lang.String localName) |
static org.w3c.dom.Attr |
asDOMAttr(Node attribute) |
static org.w3c.dom.Document |
asDOMDocument(Document document) |
static org.w3c.dom.DocumentType |
asDOMDocumentType(DocumentType dt) |
static org.w3c.dom.Element |
asDOMElement(Node element) |
static org.w3c.dom.Node |
asDOMNode(Node node) |
static org.w3c.dom.Text |
asDOMText(CharacterData text) |
static org.w3c.dom.Node |
cloneNode(Node node,
boolean deep) |
static org.w3c.dom.NodeList |
createNodeList(java.util.List<Node> list) |
static void |
deleteData(CharacterData charData,
int offset,
int count) |
static org.w3c.dom.NamedNodeMap |
getAttributes(Node node) |
static org.w3c.dom.NodeList |
getChildNodes(Node node) |
static java.lang.String |
getData(CharacterData charData) |
static org.w3c.dom.Node |
getFirstChild(Node node) |
static org.w3c.dom.Node |
getLastChild(Node node) |
static int |
getLength(CharacterData charData) |
static java.lang.String |
getLocalName(Node node) |
static java.lang.String |
getNamespaceURI(Node node) |
static org.w3c.dom.Node |
getNextSibling(Node node) |
static java.lang.String |
getNodeValue(Node node) |
static org.w3c.dom.Document |
getOwnerDocument(Node node) |
static org.w3c.dom.Node |
getParentNode(Node node) |
static java.lang.String |
getPrefix(Node node) |
static org.w3c.dom.Node |
getPreviousSibling(Node node) |
static boolean |
hasAttributes(Node node) |
static boolean |
hasChildNodes(Node node) |
static org.w3c.dom.Node |
insertBefore(Node node,
org.w3c.dom.Node newChild,
org.w3c.dom.Node refChild) |
static void |
insertData(CharacterData data,
int offset,
java.lang.String arg) |
static boolean |
isNodeEquals(org.w3c.dom.Node node1,
org.w3c.dom.Node node2) |
static boolean |
isNodeSame(org.w3c.dom.Node node1,
org.w3c.dom.Node node2) |
static boolean |
isStringEquals(java.lang.String string1,
java.lang.String string2) |
static boolean |
isSupported(Node n,
java.lang.String feature,
java.lang.String version) |
static void |
normalize(Node node) |
static void |
notSupported()
Called when a method has not been implemented yet
|
static org.w3c.dom.Node |
removeChild(Node node,
org.w3c.dom.Node oldChild) |
static org.w3c.dom.Node |
replaceChild(Node node,
org.w3c.dom.Node newChild,
org.w3c.dom.Node oldChild) |
static void |
replaceData(CharacterData charData,
int offset,
int count,
java.lang.String arg) |
static void |
setData(CharacterData charData,
java.lang.String data) |
static void |
setNodeValue(Node node,
java.lang.String nodeValue) |
static void |
setPrefix(Node node,
java.lang.String prefix) |
static java.lang.String |
substringData(CharacterData charData,
int offset,
int count) |
static boolean |
supports(Node node,
java.lang.String feature,
java.lang.String version) |
public static boolean supports(Node node, java.lang.String feature, java.lang.String version)
public static java.lang.String getNamespaceURI(Node node)
public static java.lang.String getPrefix(Node node)
public static java.lang.String getLocalName(Node node)
public static void setPrefix(Node node, java.lang.String prefix) throws org.w3c.dom.DOMException
org.w3c.dom.DOMException
public static java.lang.String getNodeValue(Node node) throws org.w3c.dom.DOMException
org.w3c.dom.DOMException
public static void setNodeValue(Node node, java.lang.String nodeValue) throws org.w3c.dom.DOMException
org.w3c.dom.DOMException
public static org.w3c.dom.Node getParentNode(Node node)
public static org.w3c.dom.NodeList getChildNodes(Node node)
public static org.w3c.dom.Node getFirstChild(Node node)
public static org.w3c.dom.Node getLastChild(Node node)
public static org.w3c.dom.Node getPreviousSibling(Node node)
public static org.w3c.dom.Node getNextSibling(Node node)
public static org.w3c.dom.NamedNodeMap getAttributes(Node node)
public static org.w3c.dom.Document getOwnerDocument(Node node)
public static org.w3c.dom.Node insertBefore(Node node, org.w3c.dom.Node newChild, org.w3c.dom.Node refChild) throws org.w3c.dom.DOMException
org.w3c.dom.DOMException
public static org.w3c.dom.Node replaceChild(Node node, org.w3c.dom.Node newChild, org.w3c.dom.Node oldChild) throws org.w3c.dom.DOMException
org.w3c.dom.DOMException
public static org.w3c.dom.Node removeChild(Node node, org.w3c.dom.Node oldChild) throws org.w3c.dom.DOMException
org.w3c.dom.DOMException
public static org.w3c.dom.Node appendChild(Node node, org.w3c.dom.Node newChild) throws org.w3c.dom.DOMException
org.w3c.dom.DOMException
public static boolean hasChildNodes(Node node)
public static org.w3c.dom.Node cloneNode(Node node, boolean deep)
public static void normalize(Node node)
public static boolean isSupported(Node n, java.lang.String feature, java.lang.String version)
public static boolean hasAttributes(Node node)
public static java.lang.String getData(CharacterData charData) throws org.w3c.dom.DOMException
org.w3c.dom.DOMException
public static void setData(CharacterData charData, java.lang.String data) throws org.w3c.dom.DOMException
org.w3c.dom.DOMException
public static int getLength(CharacterData charData)
public static java.lang.String substringData(CharacterData charData, int offset, int count) throws org.w3c.dom.DOMException
org.w3c.dom.DOMException
public static void appendData(CharacterData charData, java.lang.String arg) throws org.w3c.dom.DOMException
org.w3c.dom.DOMException
public static void insertData(CharacterData data, int offset, java.lang.String arg) throws org.w3c.dom.DOMException
org.w3c.dom.DOMException
public static void deleteData(CharacterData charData, int offset, int count) throws org.w3c.dom.DOMException
org.w3c.dom.DOMException
public static void replaceData(CharacterData charData, int offset, int count, java.lang.String arg) throws org.w3c.dom.DOMException
org.w3c.dom.DOMException
public static void appendElementsByTagName(java.util.List<? super Element> list, Branch parent, java.lang.String name)
public static void appendElementsByTagNameNS(java.util.List<? super Element> list, Branch parent, java.lang.String namespace, java.lang.String localName)
public static org.w3c.dom.NodeList createNodeList(java.util.List<Node> list)
public static org.w3c.dom.Node asDOMNode(Node node)
public static org.w3c.dom.Document asDOMDocument(Document document)
public static org.w3c.dom.DocumentType asDOMDocumentType(DocumentType dt)
public static org.w3c.dom.Text asDOMText(CharacterData text)
public static org.w3c.dom.Element asDOMElement(Node element)
public static org.w3c.dom.Attr asDOMAttr(Node attribute)
public static void notSupported()
org.w3c.dom.DOMException
- DOCUMENT ME!public static boolean isStringEquals(java.lang.String string1, java.lang.String string2)
public static boolean isNodeEquals(org.w3c.dom.Node node1, org.w3c.dom.Node node2)
public static boolean isNodeSame(org.w3c.dom.Node node1, org.w3c.dom.Node node2)