Package org.dom4j.dom
Class DOMNodeHelper
- java.lang.Object
 - 
- org.dom4j.dom.DOMNodeHelper
 
 
- 
public class DOMNodeHelper extends Object
DOMNodeHelpercontains a collection of utility methods for use across Node implementations. 
- 
- 
Nested Class Summary
Nested Classes Modifier and Type Class Description static classDOMNodeHelper.EmptyNodeList 
- 
Field Summary
Fields Modifier and Type Field Description static NodeListEMPTY_NODE_LIST 
- 
Constructor Summary
Constructors Modifier Constructor Description protectedDOMNodeHelper() 
- 
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static NodeappendChild(Node node, Node newChild)static voidappendData(CharacterData charData, String arg)static voidappendElementsByTagName(List<? super Element> list, Branch parent, String name)static voidappendElementsByTagNameNS(List<? super Element> list, Branch parent, String namespace, String localName)static AttrasDOMAttr(Node attribute)static DocumentasDOMDocument(Document document)static DocumentTypeasDOMDocumentType(DocumentType dt)static ElementasDOMElement(Node element)static NodeasDOMNode(Node node)static TextasDOMText(CharacterData text)static NodecloneNode(Node node, boolean deep)static NodeListcreateNodeList(List<Node> list)static voiddeleteData(CharacterData charData, int offset, int count)static NamedNodeMapgetAttributes(Node node)static NodeListgetChildNodes(Node node)static StringgetData(CharacterData charData)static NodegetFirstChild(Node node)static NodegetLastChild(Node node)static intgetLength(CharacterData charData)static StringgetLocalName(Node node)static StringgetNamespaceURI(Node node)static NodegetNextSibling(Node node)static StringgetNodeValue(Node node)static DocumentgetOwnerDocument(Node node)static NodegetParentNode(Node node)static StringgetPrefix(Node node)static NodegetPreviousSibling(Node node)static booleanhasAttributes(Node node)static booleanhasChildNodes(Node node)static NodeinsertBefore(Node node, Node newChild, Node refChild)static voidinsertData(CharacterData data, int offset, String arg)static booleanisNodeEquals(Node node1, Node node2)static booleanisNodeSame(Node node1, Node node2)static booleanisStringEquals(String string1, String string2)static booleanisSupported(Node n, String feature, String version)static voidnormalize(Node node)static voidnotSupported()Called when a method has not been implemented yetstatic NoderemoveChild(Node node, Node oldChild)static NodereplaceChild(Node node, Node newChild, Node oldChild)static voidreplaceData(CharacterData charData, int offset, int count, String arg)static voidsetData(CharacterData charData, String data)static voidsetNodeValue(Node node, String nodeValue)static voidsetPrefix(Node node, String prefix)static StringsubstringData(CharacterData charData, int offset, int count)static booleansupports(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!
 
 - 
 
 -