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