Package org.dom4j.dom
Class DOMNodeHelper
- java.lang.Object
-
- org.dom4j.dom.DOMNodeHelper
-
public class DOMNodeHelper extends Object
DOMNodeHelper
contains a collection of utility methods for use across Node implementations.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
DOMNodeHelper.EmptyNodeList
-
Field Summary
Fields Modifier and Type Field Description static NodeList
EMPTY_NODE_LIST
-
Constructor Summary
Constructors Modifier Constructor Description protected
DOMNodeHelper()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method 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 yetstatic 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)
-
-
-
Field Detail
-
EMPTY_NODE_LIST
public static final NodeList EMPTY_NODE_LIST
-
-
Method Detail
-
setPrefix
public static void setPrefix(Node node, String prefix) throws DOMException
- Throws:
DOMException
-
getNodeValue
public static String getNodeValue(Node node) throws DOMException
- Throws:
DOMException
-
setNodeValue
public static void setNodeValue(Node node, String nodeValue) throws DOMException
- Throws:
DOMException
-
getAttributes
public static NamedNodeMap getAttributes(Node node)
-
insertBefore
public static Node insertBefore(Node node, Node newChild, Node refChild) throws DOMException
- Throws:
DOMException
-
replaceChild
public static Node replaceChild(Node node, Node newChild, Node oldChild) throws DOMException
- Throws:
DOMException
-
removeChild
public static Node removeChild(Node node, Node oldChild) throws DOMException
- Throws:
DOMException
-
appendChild
public static Node appendChild(Node node, Node newChild) throws DOMException
- Throws:
DOMException
-
hasChildNodes
public static boolean hasChildNodes(Node node)
-
normalize
public static void normalize(Node node)
-
hasAttributes
public static boolean hasAttributes(Node node)
-
getData
public static String getData(CharacterData charData) throws DOMException
- Throws:
DOMException
-
setData
public static void setData(CharacterData charData, String data) throws DOMException
- Throws:
DOMException
-
getLength
public static int getLength(CharacterData charData)
-
substringData
public static String substringData(CharacterData charData, int offset, int count) throws DOMException
- Throws:
DOMException
-
appendData
public static void appendData(CharacterData charData, String arg) throws DOMException
- Throws:
DOMException
-
insertData
public static void insertData(CharacterData data, int offset, String arg) throws DOMException
- Throws:
DOMException
-
deleteData
public static void deleteData(CharacterData charData, int offset, int count) throws DOMException
- Throws:
DOMException
-
replaceData
public static void replaceData(CharacterData charData, int offset, int count, String arg) throws DOMException
- Throws:
DOMException
-
appendElementsByTagName
public static void appendElementsByTagName(List<? super Element> list, Branch parent, String name)
-
appendElementsByTagNameNS
public static void appendElementsByTagNameNS(List<? super Element> list, Branch parent, String namespace, String localName)
-
asDOMDocumentType
public static DocumentType asDOMDocumentType(DocumentType dt)
-
asDOMText
public static Text asDOMText(CharacterData text)
-
notSupported
public static void notSupported()
Called when a method has not been implemented yet- Throws:
DOMException
- DOCUMENT ME!
-
-