public class HTMLElementImpl extends ElementImpl implements org.w3c.dom.html.HTMLElement
Element that
will only appear inside HTML documents. This element extends ElementImpl by adding methods for directly manipulating
HTML-specific attributes. All HTML elements gain access to the
id, title, lang, dir
and class attributes. Other elements add their own specific
attributes.
Note that some support is provided by NodeImpl
directly: translating all tag names to upper case and all attribute names
to lower case.
HTMLElement,
ElementImplATTLIST_DECL_NODE, ELEMENT_DECL_NODE, PARAM_ENTITY_NODEATTRIBUTE_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| Modifier and Type | Method and Description |
|---|---|
protected NodeImpl |
castNewChild(Node newChild)
Checks whether newChild can be added to this node as a child,
and if so, performs a necessary cast.
|
Object |
clone() |
Node |
cloneNode(boolean deep) |
String |
getAttribute(String attrName) |
Attr |
getAttributeNode(String attrName) |
Attr |
getAttributeNodeNS(String namespaceURI,
String localName) |
String |
getAttributeNS(String namespaceURI,
String localName) |
String |
getClassName() |
String |
getDir() |
NodeList |
getElementsByTagName(String tagName)
Returns a list of elements extracted based on their tag name (or all of
them if the tag name is "*").
|
NodeList |
getElementsByTagNameNS(String namespaceURI,
String localName) |
org.w3c.dom.html.HTMLFormElement |
getForm()
Convenience method returns the form in which this form element is contained.
|
String |
getId() |
String |
getLang() |
String |
getTitle() |
void |
setClassName(String className) |
void |
setDir(String dir) |
void |
setId(String id) |
void |
setLang(String lang) |
void |
setTitle(String title) |
cloneInto, compareDocumentPosition, equals, getAttributes, getBaseURI, getFeature, getNodeType, getSchemaTypeInfo, getTagName, getTextContent, getUserData, hasAttribute, hasAttributeNS, hasAttributes, isDefaultNamespace, isEqualNode, isSameNode, isSupported, lookupNamespaceURI, lookupPrefix, normalize, removeAttribute, removeAttributeNode, removeAttributeNS, setAttribute, setAttributeNode, setAttributeNodeNS, setAttributeNS, setIdAttribute, setIdAttributeNode, setIdAttributeNS, setNodeValue, setTextContent, setUserData, toStringgetLocalName, getNamespaceURI, getPrefix, setPrefixappendChild, castOldChild, createNodeIterator, getChildNodes, getFirstChild, getLastChild, hasChildNodes, insertBefore, removeChild, removeInnerIterator, replaceChildgetNextSibling, getNodeName, getNodeValue, getOwnerDocument, getParentNode, getPreviousSibling, isReadOnly, makeReadOnly, setOwnerDocument, supportsfinalize, getClass, hashCode, notify, notifyAll, wait, wait, waitgetSchemaTypeInfo, getTagName, hasAttribute, hasAttributeNS, removeAttribute, removeAttributeNode, removeAttributeNS, setAttribute, setAttributeNode, setAttributeNodeNS, setAttributeNS, setIdAttribute, setIdAttributeNode, setIdAttributeNSappendChild, compareDocumentPosition, getAttributes, getBaseURI, getChildNodes, getFeature, getFirstChild, getLastChild, getLocalName, getNamespaceURI, getNextSibling, getNodeName, getNodeType, getNodeValue, getOwnerDocument, getParentNode, getPrefix, getPreviousSibling, getTextContent, getUserData, hasAttributes, hasChildNodes, insertBefore, isDefaultNamespace, isEqualNode, isSameNode, isSupported, lookupNamespaceURI, lookupPrefix, normalize, removeChild, replaceChild, setNodeValue, setPrefix, setTextContent, setUserDatapublic String getId()
getId in interface org.w3c.dom.html.HTMLElementpublic void setId(String id)
setId in interface org.w3c.dom.html.HTMLElementpublic String getTitle()
getTitle in interface org.w3c.dom.html.HTMLElementpublic void setTitle(String title)
setTitle in interface org.w3c.dom.html.HTMLElementpublic String getLang()
getLang in interface org.w3c.dom.html.HTMLElementpublic void setLang(String lang)
setLang in interface org.w3c.dom.html.HTMLElementpublic String getDir()
getDir in interface org.w3c.dom.html.HTMLElementpublic void setDir(String dir)
setDir in interface org.w3c.dom.html.HTMLElementpublic String getClassName()
getClassName in interface org.w3c.dom.html.HTMLElementpublic void setClassName(String className)
setClassName in interface org.w3c.dom.html.HTMLElementpublic Attr getAttributeNode(String attrName)
getAttributeNode in interface ElementgetAttributeNode in class ElementImplpublic Attr getAttributeNodeNS(String namespaceURI, String localName)
getAttributeNodeNS in interface ElementgetAttributeNodeNS in class ElementImplpublic String getAttribute(String attrName)
getAttribute in interface ElementgetAttribute in class ElementImplpublic String getAttributeNS(String namespaceURI, String localName)
getAttributeNS in interface ElementgetAttributeNS in class ElementImplpublic final NodeList getElementsByTagName(String tagName)
ElementImplgetElementsByTagName in interface ElementgetElementsByTagName in class ElementImpltagName - The element tag name to look for or "*" for all elementspublic final NodeList getElementsByTagNameNS(String namespaceURI, String localName)
getElementsByTagNameNS in interface ElementgetElementsByTagNameNS in class ElementImplpublic org.w3c.dom.html.HTMLFormElement getForm()
protected NodeImpl castNewChild(Node newChild) throws DOMException
ParentNodeImplThe following rules govern the allowed newChild types:
Attr, newChild must be
either a Text or an EntityReference
DocumentType, newChild must be
either an Entity or a Notation.
Element, a CharacterData derived type, a DocumentFragment, an EntityReference or a ProcessingInstruction.
castNewChild in class ParentNodeImplnewChild - New child nodeNodeImplDOMException - HIERARCHY_REQUEST_ERR
newChild is null, does not belong to this DOM, or its node
type is not supported for this parentpublic final Object clone()
clone in class ElementImplpublic final Node cloneNode(boolean deep)
cloneNode in interface NodecloneNode in class ElementImplPhantom® and NetPhantom® are registered trademarks of Mindus SARL.
© © Mindus SARL, 2024. All rights reserved.