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 $
- See Also:
-
Field Summary
Fields inherited from class DefaultDocumentType
elementName
Fields inherited from class AbstractNode
NODE_TYPE_NAMES
Fields 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_NODE
Fields 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) private void
checkNewChildNode
(Node newChild) cloneNode
(boolean deep) short
compareDocumentPosition
(Node other) getFeature
(String feature, String version) short
Returns the code according to the type of node.getUserData
(String key) boolean
boolean
insertBefore
(Node newChild, Node refChild) boolean
isDefaultNamespace
(String namespaceURI) boolean
isEqualNode
(Node other) boolean
isSameNode
(Node other) boolean
isSupported
(String feature, String version) lookupNamespaceURI
(String prefix) lookupPrefix
(String namespaceURI) void
removeChild
(Node oldChild) replaceChild
(Node newChild, Node oldChild) void
setNodeValue
(String nodeValue) void
void
setTextContent
(String textContent) setUserData
(String key, Object data, UserDataHandler handler) boolean
Methods inherited from class DefaultDocumentType
getElementName, getExternalDeclarations, getInternalDeclarations, getPublicID, getSystemID, setElementName, setExternalDeclarations, setInternalDeclarations, setPublicID, setSystemID
Methods inherited from class AbstractDocumentType
accept, asXML, getName, getPath, getText, getUniquePath, setName, toString, write
Methods 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, valueOf
Methods inherited from class Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface DocumentType
getName
Methods 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:
getNamespaceURI
in interfaceNode
-
getPrefix
-
setPrefix
- Specified by:
setPrefix
in interfaceNode
- Throws:
DOMException
-
getLocalName
- Specified by:
getLocalName
in interfaceNode
-
getNodeName
- Specified by:
getNodeName
in interfaceNode
-
getNodeValue
- Specified by:
getNodeValue
in interfaceNode
- Throws:
DOMException
-
setNodeValue
- Specified by:
setNodeValue
in interfaceNode
- Throws:
DOMException
-
getParentNode
- Specified by:
getParentNode
in interfaceNode
-
getChildNodes
- Specified by:
getChildNodes
in interfaceNode
-
getFirstChild
- Specified by:
getFirstChild
in interfaceNode
-
getLastChild
- Specified by:
getLastChild
in interfaceNode
-
getPreviousSibling
- Specified by:
getPreviousSibling
in interfaceNode
-
getNextSibling
- Specified by:
getNextSibling
in interfaceNode
-
getAttributes
- Specified by:
getAttributes
in interfaceNode
-
getOwnerDocument
- Specified by:
getOwnerDocument
in interfaceNode
-
insertBefore
- Specified by:
insertBefore
in interfaceNode
- Throws:
DOMException
-
replaceChild
- Specified by:
replaceChild
in interfaceNode
- Throws:
DOMException
-
removeChild
- Specified by:
removeChild
in interfaceNode
- Throws:
DOMException
-
appendChild
- Specified by:
appendChild
in interfaceNode
- Throws:
DOMException
-
checkNewChildNode
- Throws:
DOMException
-
hasChildNodes
public boolean hasChildNodes()- Specified by:
hasChildNodes
in interfaceNode
-
cloneNode
-
normalize
-
isSupported
- Specified by:
isSupported
in interfaceNode
-
hasAttributes
public boolean hasAttributes()- Specified by:
hasAttributes
in interfaceNode
-
getEntities
- Specified by:
getEntities
in interfaceDocumentType
-
getNotations
- Specified by:
getNotations
in interfaceDocumentType
-
getPublicId
- Specified by:
getPublicId
in interfaceDocumentType
-
getSystemId
- Specified by:
getSystemId
in interfaceDocumentType
-
getInternalSubset
- Specified by:
getInternalSubset
in interfaceDocumentType
-
getBaseURI
- Specified by:
getBaseURI
in interfaceNode
-
compareDocumentPosition
- Specified by:
compareDocumentPosition
in interfaceNode
- Throws:
DOMException
-
getTextContent
- Specified by:
getTextContent
in interfaceNode
- Throws:
DOMException
-
setTextContent
- Specified by:
setTextContent
in interfaceNode
- Throws:
DOMException
-
isSameNode
- Specified by:
isSameNode
in interfaceNode
-
lookupPrefix
- Specified by:
lookupPrefix
in interfaceNode
-
isDefaultNamespace
- Specified by:
isDefaultNamespace
in interfaceNode
-
lookupNamespaceURI
- Specified by:
lookupNamespaceURI
in interfaceNode
-
isEqualNode
- Specified by:
isEqualNode
in interfaceNode
-
getFeature
- Specified by:
getFeature
in interfaceNode
-
setUserData
- Specified by:
setUserData
in interfaceNode
-
getUserData
- Specified by:
getUserData
in interfaceNode
-
getNodeType
public short getNodeType()Description copied from interface:Node
Returns 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:
getNodeType
in interfaceNode
- Specified by:
getNodeType
in interfaceNode
- Overrides:
getNodeType
in classAbstractDocumentType
- Returns:
- a W3C DOM complient code for the node type such as ELEMENT_NODE or ATTRIBUTE_NODE
-