Class DOMDocumentType
java.lang.Object
org.dom4j.tree.AbstractNode
org.dom4j.tree.AbstractDocumentType
org.dom4j.tree.DefaultDocumentType
org.dom4j.dom.DOMDocumentType
- All Implemented Interfaces:
Serializable, Cloneable, DocumentType, Node, DocumentType, Node
DOMDocumentType implements a DocumentType node which supports
the W3C DOM API.
- Version:
- $Revision: 1.11 $
- Author:
- James Strachan
- See Also:
-
Field Summary
Fields inherited from class DefaultDocumentType
elementNameFields inherited from class AbstractNode
NODE_TYPE_NAMESFields inherited from interface 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_NODEFields inherited from interface Node
ATTRIBUTE_NODE, CDATA_SECTION_NODE, COMMENT_NODE, DOCUMENT_FRAGMENT_NODE, DOCUMENT_NODE, DOCUMENT_POSITION_CONTAINED_BY, DOCUMENT_POSITION_CONTAINS, DOCUMENT_POSITION_DISCONNECTED, DOCUMENT_POSITION_FOLLOWING, DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC, DOCUMENT_POSITION_PRECEDING, DOCUMENT_TYPE_NODE, ELEMENT_NODE, ENTITY_NODE, ENTITY_REFERENCE_NODE, NOTATION_NODE, PROCESSING_INSTRUCTION_NODE, TEXT_NODE -
Constructor Summary
ConstructorsConstructorDescriptionDOMDocumentType(String elementName, String systemID) DOMDocumentType(String name, String publicID, String systemID) -
Method Summary
Modifier and TypeMethodDescriptionappendChild(Node newChild) cloneNode(boolean deep) shortcompareDocumentPosition(Node other) getFeature(String feature, String version) shortReturns the code according to the type of node.getUserData(String key) booleanbooleaninsertBefore(Node newChild, Node refChild) booleanisDefaultNamespace(String namespaceURI) booleanisEqualNode(Node other) booleanisSameNode(Node other) booleanisSupported(String feature, String version) lookupNamespaceURI(String prefix) lookupPrefix(String namespaceURI) voidremoveChild(Node oldChild) replaceChild(Node newChild, Node oldChild) voidsetNodeValue(String nodeValue) voidvoidsetTextContent(String textContent) setUserData(String key, Object data, UserDataHandler handler) booleanMethods inherited from class DefaultDocumentType
getElementName, getExternalDeclarations, getInternalDeclarations, getPublicID, getSystemID, setElementName, setExternalDeclarations, setInternalDeclarations, setPublicID, setSystemIDMethods inherited from class AbstractDocumentType
accept, asXML, getName, getPath, getText, getUniquePath, setName, toString, writeMethods inherited from class AbstractNode
asXPathResult, clone, createPattern, createXPath, createXPathFilter, createXPathResult, detach, getDocument, getDocumentFactory, getNodeTypeName, getParent, getPath, getStringValue, getUniquePath, hasContent, isReadOnly, matches, numberValueOf, selectNodes, selectNodes, selectNodes, selectObject, selectSingleNode, setDocument, setParent, setText, supportsParent, valueOfMethods inherited from class Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface DocumentType
getNameMethods inherited from interface Node
asXPathResult, clone, createXPath, detach, getDocument, getNodeTypeName, getParent, getPath, getStringValue, getUniquePath, hasContent, isReadOnly, matches, numberValueOf, selectNodes, selectNodes, selectNodes, selectObject, selectSingleNode, setDocument, setParent, setText, supportsParent, valueOf
-
Constructor Details
-
DOMDocumentType
public DOMDocumentType() -
DOMDocumentType
-
DOMDocumentType
-
-
Method Details
-
supports
-
getNamespaceURI
- Specified by:
getNamespaceURIin interfaceNode
-
getPrefix
-
setPrefix
- Specified by:
setPrefixin interfaceNode- Throws:
DOMException
-
getLocalName
- Specified by:
getLocalNamein interfaceNode
-
getNodeName
- Specified by:
getNodeNamein interfaceNode
-
getNodeValue
- Specified by:
getNodeValuein interfaceNode- Throws:
DOMException
-
setNodeValue
- Specified by:
setNodeValuein interfaceNode- Throws:
DOMException
-
getParentNode
- Specified by:
getParentNodein interfaceNode
-
getChildNodes
- Specified by:
getChildNodesin interfaceNode
-
getFirstChild
- Specified by:
getFirstChildin interfaceNode
-
getLastChild
- Specified by:
getLastChildin interfaceNode
-
getPreviousSibling
- Specified by:
getPreviousSiblingin interfaceNode
-
getNextSibling
- Specified by:
getNextSiblingin interfaceNode
-
getAttributes
- Specified by:
getAttributesin interfaceNode
-
getOwnerDocument
- Specified by:
getOwnerDocumentin interfaceNode
-
insertBefore
- Specified by:
insertBeforein interfaceNode- Throws:
DOMException
-
replaceChild
- Specified by:
replaceChildin interfaceNode- Throws:
DOMException
-
removeChild
- Specified by:
removeChildin interfaceNode- Throws:
DOMException
-
appendChild
- Specified by:
appendChildin interfaceNode- Throws:
DOMException
-
hasChildNodes
public boolean hasChildNodes()- Specified by:
hasChildNodesin interfaceNode
-
cloneNode
-
normalize
-
isSupported
- Specified by:
isSupportedin interfaceNode
-
hasAttributes
public boolean hasAttributes()- Specified by:
hasAttributesin interfaceNode
-
getEntities
- Specified by:
getEntitiesin interfaceDocumentType
-
getNotations
- Specified by:
getNotationsin interfaceDocumentType
-
getPublicId
- Specified by:
getPublicIdin interfaceDocumentType
-
getSystemId
- Specified by:
getSystemIdin interfaceDocumentType
-
getInternalSubset
- Specified by:
getInternalSubsetin interfaceDocumentType
-
getBaseURI
- Specified by:
getBaseURIin interfaceNode
-
compareDocumentPosition
- Specified by:
compareDocumentPositionin interfaceNode- Throws:
DOMException
-
getTextContent
- Specified by:
getTextContentin interfaceNode- Throws:
DOMException
-
setTextContent
- Specified by:
setTextContentin interfaceNode- Throws:
DOMException
-
isSameNode
- Specified by:
isSameNodein interfaceNode
-
lookupPrefix
- Specified by:
lookupPrefixin interfaceNode
-
isDefaultNamespace
- Specified by:
isDefaultNamespacein interfaceNode
-
lookupNamespaceURI
- Specified by:
lookupNamespaceURIin interfaceNode
-
isEqualNode
- Specified by:
isEqualNodein interfaceNode
-
getFeature
- Specified by:
getFeaturein interfaceNode
-
setUserData
- Specified by:
setUserDatain interfaceNode
-
getUserData
- Specified by:
getUserDatain interfaceNode
-
getNodeType
public short getNodeType()Description copied from interface:NodeReturns the code according to the type of node. This makes processing nodes polymorphically much easier as the switch statement can be used instead of multiple if (instanceof) statements.- Specified by:
getNodeTypein interfaceNode- Specified by:
getNodeTypein interfaceNode- Overrides:
getNodeTypein classAbstractDocumentType- Returns:
- a W3C DOM complient code for the node type such as ELEMENT_NODE or ATTRIBUTE_NODE
-