org.dom4j.dom
Class DOMDocument
java.lang.Object
org.dom4j.tree.AbstractNode
org.dom4j.tree.AbstractBranch
org.dom4j.tree.AbstractDocument
org.dom4j.tree.DefaultDocument
org.dom4j.dom.DOMDocument
- All Implemented Interfaces:
- Branch, Cloneable, Document, Document, Node, Node, Serializable
- public class DOMDocument
- extends DefaultDocument
- implements Document
DOMDocument implements an XML document which supports the W3C
DOM API.
- Version:
- $Revision: 1.17 $
- Author:
- James Strachan
- See Also:
- Serialized Form
| Fields inherited from interface org.w3c.dom.Node |
ATTRIBUTE_NODE, CDATA_SECTION_NODE, COMMENT_NODE, DOCUMENT_FRAGMENT_NODE, DOCUMENT_NODE, DOCUMENT_TYPE_NODE, ELEMENT_NODE, ENTITY_NODE, ENTITY_REFERENCE_NODE, NOTATION_NODE, PROCESSING_INSTRUCTION_NODE, TEXT_NODE |
| Fields inherited from interface org.dom4j.Node |
ANY_NODE, ATTRIBUTE_NODE, CDATA_SECTION_NODE, COMMENT_NODE, DOCUMENT_NODE, DOCUMENT_TYPE_NODE, ELEMENT_NODE, ENTITY_REFERENCE_NODE, MAX_NODE_TYPE, NAMESPACE_NODE, PROCESSING_INSTRUCTION_NODE, TEXT_NODE, UNKNOWN_NODE |
| Methods inherited from class org.dom4j.tree.DefaultDocument |
addDocType, addNode, addNode, clearContent, clone, contentList, getDocType, getEntityResolver, getName, getRootElement, getXMLEncoding, processingInstruction, processingInstructions, processingInstructions, removeNode, removeProcessingInstruction, rootElementAdded, setContent, setDocType, setDocumentFactory, setEntityResolver, setName |
| Methods inherited from class org.dom4j.tree.AbstractDocument |
accept, add, addComment, addElement, addElement, addElement, addProcessingInstruction, addProcessingInstruction, asXML, asXPathResult, checkAddElementAllowed, childAdded, childRemoved, getDocument, getNodeType, getPath, getStringValue, getUniquePath, normalize, remove, setRootElement, setXMLEncoding, toString, write |
| Methods inherited from class org.dom4j.tree.AbstractBranch |
add, add, add, addElement, appendContent, content, contentRemoved, createContentList, createContentList, createEmptyList, createResultList, createSingleResultList, elementByID, elementID, getContentAsStringValue, getContentAsText, getText, getTextTrim, hasContent, indexOf, invalidNodeTypeAddException, isReadOnly, node, nodeCount, nodeIterator, remove, remove, remove, setProcessingInstructions |
| Methods inherited from class org.dom4j.tree.AbstractNode |
createPattern, createXPath, createXPathFilter, createXPathResult, detach, getNodeTypeName, getParent, getPath, getUniquePath, matches, numberValueOf, selectNodes, selectNodes, selectNodes, selectObject, selectSingleNode, setDocument, setParent, setText, supportsParent, valueOf |
| Methods inherited from interface org.dom4j.Branch |
add, add, add, appendContent, content, elementByID, indexOf, node, nodeCount, nodeIterator, remove, remove, remove, setProcessingInstructions |
| Methods inherited from interface org.dom4j.Node |
createXPath, detach, getNodeTypeName, getParent, getPath, getText, getUniquePath, hasContent, isReadOnly, matches, numberValueOf, selectNodes, selectNodes, selectNodes, selectObject, selectSingleNode, setDocument, setParent, setText, supportsParent, valueOf |
DOMDocument
public DOMDocument()
DOMDocument
public DOMDocument(String name)
DOMDocument
public DOMDocument(DOMElement rootElement)
DOMDocument
public DOMDocument(DOMDocumentType docType)
DOMDocument
public DOMDocument(DOMElement rootElement,
DOMDocumentType docType)
DOMDocument
public DOMDocument(String name,
DOMElement rootElement,
DOMDocumentType docType)
supports
public boolean supports(String feature,
String version)
getNamespaceURI
public String getNamespaceURI()
- Specified by:
getNamespaceURI in interface Node
getPrefix
public String getPrefix()
- Specified by:
getPrefix in interface Node
setPrefix
public void setPrefix(String prefix)
throws DOMException
- Specified by:
setPrefix in interface Node
- Throws:
DOMException
getLocalName
public String getLocalName()
- Specified by:
getLocalName in interface Node
getNodeName
public String getNodeName()
- Specified by:
getNodeName in interface Node
getNodeValue
public String getNodeValue()
throws DOMException
- Specified by:
getNodeValue in interface Node
- Throws:
DOMException
setNodeValue
public void setNodeValue(String nodeValue)
throws DOMException
- Specified by:
setNodeValue in interface Node
- Throws:
DOMException
getParentNode
public Node getParentNode()
- Specified by:
getParentNode in interface Node
getChildNodes
public NodeList getChildNodes()
- Specified by:
getChildNodes in interface Node
getFirstChild
public Node getFirstChild()
- Specified by:
getFirstChild in interface Node
getLastChild
public Node getLastChild()
- Specified by:
getLastChild in interface Node
getPreviousSibling
public Node getPreviousSibling()
- Specified by:
getPreviousSibling in interface Node
getNextSibling
public Node getNextSibling()
- Specified by:
getNextSibling in interface Node
getAttributes
public NamedNodeMap getAttributes()
- Specified by:
getAttributes in interface Node
getOwnerDocument
public Document getOwnerDocument()
- Specified by:
getOwnerDocument in interface Node
insertBefore
public Node insertBefore(Node newChild,
Node refChild)
throws DOMException
- Specified by:
insertBefore in interface Node
- Throws:
DOMException
replaceChild
public Node replaceChild(Node newChild,
Node oldChild)
throws DOMException
- Specified by:
replaceChild in interface Node
- Throws:
DOMException
removeChild
public Node removeChild(Node oldChild)
throws DOMException
- Specified by:
removeChild in interface Node
- Throws:
DOMException
appendChild
public Node appendChild(Node newChild)
throws DOMException
- Specified by:
appendChild in interface Node
- Throws:
DOMException
hasChildNodes
public boolean hasChildNodes()
- Specified by:
hasChildNodes in interface Node
cloneNode
public Node cloneNode(boolean deep)
- Specified by:
cloneNode in interface Node
isSupported
public boolean isSupported(String feature,
String version)
- Specified by:
isSupported in interface Node
hasAttributes
public boolean hasAttributes()
- Specified by:
hasAttributes in interface Node
getElementsByTagName
public NodeList getElementsByTagName(String name)
- Specified by:
getElementsByTagName in interface Document
getElementsByTagNameNS
public NodeList getElementsByTagNameNS(String namespace,
String name)
- Specified by:
getElementsByTagNameNS in interface Document
getDoctype
public DocumentType getDoctype()
- Specified by:
getDoctype in interface Document
getImplementation
public DOMImplementation getImplementation()
- Specified by:
getImplementation in interface Document
getDocumentElement
public Element getDocumentElement()
- Specified by:
getDocumentElement in interface Document
createElement
public Element createElement(String name)
throws DOMException
- Specified by:
createElement in interface Document
- Throws:
DOMException
createDocumentFragment
public DocumentFragment createDocumentFragment()
- Specified by:
createDocumentFragment in interface Document
createTextNode
public Text createTextNode(String data)
- Specified by:
createTextNode in interface Document
createComment
public Comment createComment(String data)
- Specified by:
createComment in interface Document
createCDATASection
public CDATASection createCDATASection(String data)
throws DOMException
- Specified by:
createCDATASection in interface Document
- Throws:
DOMException
createProcessingInstruction
public ProcessingInstruction createProcessingInstruction(String target,
String data)
throws DOMException
- Specified by:
createProcessingInstruction in interface Document
- Throws:
DOMException
createAttribute
public Attr createAttribute(String name)
throws DOMException
- Specified by:
createAttribute in interface Document
- Throws:
DOMException
createEntityReference
public EntityReference createEntityReference(String name)
throws DOMException
- Specified by:
createEntityReference in interface Document
- Throws:
DOMException
importNode
public Node importNode(Node importedNode,
boolean deep)
throws DOMException
- Specified by:
importNode in interface Document
- Throws:
DOMException
createElementNS
public Element createElementNS(String namespaceURI,
String qualifiedName)
throws DOMException
- Specified by:
createElementNS in interface Document
- Throws:
DOMException
createAttributeNS
public Attr createAttributeNS(String namespaceURI,
String qualifiedName)
throws DOMException
- Specified by:
createAttributeNS in interface Document
- Throws:
DOMException
getElementById
public Element getElementById(String elementId)
- Specified by:
getElementById in interface Document
getDocumentFactory
protected DocumentFactory getDocumentFactory()
- Overrides:
getDocumentFactory in class DefaultDocument
Copyright © 2001-2005 MetaStuff Ltd.. All Rights Reserved.