Class DOMElement
DOMElement
implements an XML element which supports the W3C
DOM API.
- Version:
- $Revision: 1.23 $
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final DocumentFactory
TheDocumentFactory
instance used by defaultFields inherited from class AbstractElement
USE_STRINGVALUE_SEPARATOR, VERBOSE_TOSTRING
Fields inherited from class AbstractBranch
DEFAULT_CONTENT_LIST_SIZE
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
ConstructorsConstructorDescriptionDOMElement
(String name) DOMElement
(String name, Namespace namespace) DOMElement
(QName qname) DOMElement
(QName qname, int attributeCount) -
Method Summary
Modifier and TypeMethodDescriptionappendChild
(Node newChild) protected Attribute
protected Attribute
private void
checkNewChildNode
(Node newChild) cloneNode
(boolean deep) short
compareDocumentPosition
(Node other) protected Attribute
createAttribute
(Attr newAttr) getAttribute
(String name) getAttributeNode
(String name) getAttributeNodeNS
(String namespaceURI, String localName) getAttributeNS
(String namespaceURI, String localName) protected DocumentFactory
getElementsByTagName
(String name) getElementsByTagNameNS
(String namespace, String lName) getFeature
(String feature, String version) Returns the URI mapped to the namespace of this element if one exists otherwise an emptyString
is returned.protected QName
getUserData
(String key) boolean
hasAttribute
(String name) boolean
hasAttributeNS
(String namespaceURI, String localName) 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
removeAttribute
(String name) removeAttributeNode
(Attr oldAttr) void
removeAttributeNS
(String namespaceURI, String localName) removeChild
(Node oldChild) replaceChild
(Node newChild, Node oldChild) void
setAttribute
(String name, String value) setAttributeNode
(Attr newAttr) setAttributeNodeNS
(Attr newAttr) void
setAttributeNS
(String namespaceURI, String qualifiedName, String value) void
setIdAttribute
(String name, boolean isId) void
setIdAttributeNode
(Attr idAttr, boolean isId) void
setIdAttributeNS
(String namespaceURI, String localName, boolean isId) void
setNodeValue
(String nodeValue) void
void
setTextContent
(String textContent) setUserData
(String key, Object data, UserDataHandler handler) boolean
Methods inherited from class DefaultElement
add, additionalNamespaces, additionalNamespaces, addNewNode, attribute, attribute, attribute, attribute, attributeCount, attributeIterator, attributeList, attributeList, attributes, clearContent, clone, contentList, declaredNamespaces, element, element, element, getDocument, getNamespaceForPrefix, getNamespaceForURI, getParent, getQName, getStringValue, getText, indexOf, node, nodeCount, nodeIterator, processingInstruction, processingInstructions, processingInstructions, remove, removeNode, removeProcessingInstruction, setAttributeList, setAttributes, setContent, setDocument, setParent, setQName, supportsParent
Methods inherited from class AbstractElement
accept, add, add, add, add, add, add, add, add, addAttribute, addAttribute, addCDATA, addComment, addElement, addEntity, addNamespace, addNewNode, addNode, addNode, addProcessingInstruction, addProcessingInstruction, addText, appendAttributes, asXML, attributeValue, attributeValue, attributeValue, attributeValue, childAdded, childRemoved, createAttributeList, createAttributeList, createCopy, createCopy, createCopy, createElement, createElement, createSingleIterator, elementIterator, elementIterator, elementIterator, elementIterator, elements, elements, elements, elements, elementText, elementText, elementTextTrim, elementTextTrim, ensureAttributesCapacity, getData, getName, getNamespace, getNamespacePrefix, getNamespacesForURI, getNodeType, getPath, getQName, getQualifiedName, getUniquePath, getXPathNameStep, getXPathResult, hasMixedContent, isRootElement, isTextOnly, normalize, remove, remove, remove, remove, remove, remove, remove, remove, setAttributes, setAttributeValue, setAttributeValue, setData, setName, setNamespace, setText, toString, write
Methods inherited from class AbstractBranch
addElement, addElement, addElement, appendContent, content, contentRemoved, createContentList, createContentList, createEmptyList, createResultList, createSingleResultList, elementByID, elementID, getContentAsStringValue, getContentAsText, getTextTrim, hasContent, invalidNodeTypeAddException, isReadOnly, setProcessingInstructions
Methods inherited from class AbstractNode
asXPathResult, createPattern, createXPath, createXPathFilter, createXPathResult, detach, getNodeTypeName, getPath, getUniquePath, matches, numberValueOf, selectNodes, selectNodes, selectNodes, selectObject, selectSingleNode, valueOf
Methods inherited from class Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface Branch
addElement, addElement, appendContent, content, elementByID, setProcessingInstructions
Methods inherited from interface Element
getTextTrim
Methods inherited from interface Node
asXPathResult, createXPath, detach, getNodeTypeName, getPath, getUniquePath, hasContent, isReadOnly, matches, numberValueOf, selectNodes, selectNodes, selectNodes, selectObject, selectSingleNode, valueOf
Methods inherited from interface Node
getNodeType, normalize
-
Field Details
-
DOCUMENT_FACTORY
TheDocumentFactory
instance used by default
-
-
Constructor Details
-
DOMElement
-
DOMElement
-
DOMElement
-
DOMElement
-
-
Method Details
-
supports
-
getNamespaceURI
Description copied from interface:Element
Returns the URI mapped to the namespace of this element if one exists otherwise an emptyString
is returned.- Specified by:
getNamespaceURI
in interfaceElement
- Specified by:
getNamespaceURI
in interfaceNode
- Overrides:
getNamespaceURI
in classAbstractElement
- Returns:
- the URI for the
Namespace
of this element or an emptyString
-
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
-
isSupported
- Specified by:
isSupported
in interfaceNode
-
hasAttributes
public boolean hasAttributes()- Specified by:
hasAttributes
in interfaceNode
-
getTagName
- Specified by:
getTagName
in interfaceElement
-
getAttribute
- Specified by:
getAttribute
in interfaceElement
-
setAttribute
- Specified by:
setAttribute
in interfaceElement
- Throws:
DOMException
-
removeAttribute
- Specified by:
removeAttribute
in interfaceElement
- Throws:
DOMException
-
getAttributeNode
- Specified by:
getAttributeNode
in interfaceElement
-
setAttributeNode
- Specified by:
setAttributeNode
in interfaceElement
- Throws:
DOMException
-
removeAttributeNode
- Specified by:
removeAttributeNode
in interfaceElement
- Throws:
DOMException
-
getAttributeNS
- Specified by:
getAttributeNS
in interfaceElement
-
setAttributeNS
public void setAttributeNS(String namespaceURI, String qualifiedName, String value) throws DOMException - Specified by:
setAttributeNS
in interfaceElement
- Throws:
DOMException
-
removeAttributeNS
- Specified by:
removeAttributeNS
in interfaceElement
- Throws:
DOMException
-
getAttributeNodeNS
- Specified by:
getAttributeNodeNS
in interfaceElement
-
setAttributeNodeNS
- Specified by:
setAttributeNodeNS
in interfaceElement
- Throws:
DOMException
-
getElementsByTagName
- Specified by:
getElementsByTagName
in interfaceElement
-
getElementsByTagNameNS
- Specified by:
getElementsByTagNameNS
in interfaceElement
-
hasAttribute
- Specified by:
hasAttribute
in interfaceElement
-
hasAttributeNS
- Specified by:
hasAttributeNS
in interfaceElement
-
getDocumentFactory
- Overrides:
getDocumentFactory
in classDefaultElement
-
attribute
-
attribute
-
createAttribute
-
getQName
-
getSchemaTypeInfo
- Specified by:
getSchemaTypeInfo
in interfaceElement
-
setIdAttribute
- Specified by:
setIdAttribute
in interfaceElement
- Throws:
DOMException
-
setIdAttributeNS
public void setIdAttributeNS(String namespaceURI, String localName, boolean isId) throws DOMException - Specified by:
setIdAttributeNS
in interfaceElement
- Throws:
DOMException
-
setIdAttributeNode
- Specified by:
setIdAttributeNode
in interfaceElement
- Throws:
DOMException
-
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
-