org.dom4j.dom

Class DOMNodeHelper

public class DOMNodeHelper extends Object

DOMNodeHelper contains a collection of utility methods for use across Node implementations.

Version: $Revision: 1.20 $

Author: James Strachan

Nested Class Summary
static classDOMNodeHelper.EmptyNodeList
Field Summary
static NodeListEMPTY_NODE_LIST
Constructor Summary
protected DOMNodeHelper()
Method Summary
static NodeappendChild(Node node, Node newChild)
static voidappendData(CharacterData charData, String arg)
static voidappendElementsByTagName(List list, Branch parent, String name)
static voidappendElementsByTagNameNS(List 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 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 booleanisSupported(Node n, String feature, String version)
static voidnormalize(Node node)
static voidnotSupported()
Called when a method has not been implemented yet
static 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

Constructor Detail

DOMNodeHelper

protected DOMNodeHelper()

Method Detail

appendChild

public static Node appendChild(Node node, Node newChild)

appendData

public static void appendData(CharacterData charData, String arg)

appendElementsByTagName

public static void appendElementsByTagName(List list, Branch parent, String name)

appendElementsByTagNameNS

public static void appendElementsByTagNameNS(List list, Branch parent, String namespace, String localName)

asDOMAttr

public static Attr asDOMAttr(Node attribute)

asDOMDocument

public static Document asDOMDocument(Document document)

asDOMDocumentType

public static DocumentType asDOMDocumentType(DocumentType dt)

asDOMElement

public static Element asDOMElement(Node element)

asDOMNode

public static Node asDOMNode(Node node)

asDOMText

public static Text asDOMText(CharacterData text)

cloneNode

public static Node cloneNode(Node node, boolean deep)

createNodeList

public static NodeList createNodeList(List list)

deleteData

public static void deleteData(CharacterData charData, int offset, int count)

getAttributes

public static NamedNodeMap getAttributes(Node node)

getChildNodes

public static NodeList getChildNodes(Node node)

getData

public static String getData(CharacterData charData)

getFirstChild

public static Node getFirstChild(Node node)

getLastChild

public static Node getLastChild(Node node)

getLength

public static int getLength(CharacterData charData)

getLocalName

public static String getLocalName(Node node)

getNamespaceURI

public static String getNamespaceURI(Node node)

getNextSibling

public static Node getNextSibling(Node node)

getNodeValue

public static String getNodeValue(Node node)

getOwnerDocument

public static Document getOwnerDocument(Node node)

getParentNode

public static Node getParentNode(Node node)

getPrefix

public static String getPrefix(Node node)

getPreviousSibling

public static Node getPreviousSibling(Node node)

hasAttributes

public static boolean hasAttributes(Node node)

hasChildNodes

public static boolean hasChildNodes(Node node)

insertBefore

public static Node insertBefore(Node node, Node newChild, Node refChild)

insertData

public static void insertData(CharacterData data, int offset, String arg)

isSupported

public static boolean isSupported(Node n, String feature, String version)

normalize

public static void normalize(Node node)

notSupported

public static void notSupported()
Called when a method has not been implemented yet

Throws: DOMException DOCUMENT ME!

removeChild

public static Node removeChild(Node node, Node oldChild)

replaceChild

public static Node replaceChild(Node node, Node newChild, Node oldChild)

replaceData

public static void replaceData(CharacterData charData, int offset, int count, String arg)

setData

public static void setData(CharacterData charData, String data)

setNodeValue

public static void setNodeValue(Node node, String nodeValue)

setPrefix

public static void setPrefix(Node node, String prefix)

substringData

public static String substringData(CharacterData charData, int offset, int count)

supports

public static boolean supports(Node node, String feature, String version)
Copyright B) 2005 MetaStuff Ltd. All Rights Reserved. Hosted by

SourceForge