public class HTMLElementImpl
extends org.apache.xerces.dom.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.HTMLElement,
Serialized FormfirstChild, fNodeListCache, ownerDocumentDOCUMENT_POSITION_CONTAINS, DOCUMENT_POSITION_DISCONNECTED, DOCUMENT_POSITION_FOLLOWING, DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC, DOCUMENT_POSITION_IS_CONTAINED, DOCUMENT_POSITION_PRECEDING, ELEMENT_DEFINITION_NODE, FIRSTCHILD, flags, HASSTRING, ID, IGNORABLEWS, NORMALIZED, OWNED, ownerNode, READONLY, SPECIFIED, SYNCCHILDREN, SYNCDATA, TREE_POSITION_ANCESTOR, TREE_POSITION_DESCENDANT, TREE_POSITION_DISCONNECTED, TREE_POSITION_EQUIVALENT, TREE_POSITION_FOLLOWING, TREE_POSITION_PRECEDING, TREE_POSITION_SAME_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| Constructor and Description |
|---|
HTMLElementImpl(HTMLDocumentImpl owner,
java.lang.String tagName)
Constructor required owner document and element tag name.
|
| Modifier and Type | Method and Description |
|---|---|
java.lang.String |
getAttribute(java.lang.String attrName)
Look up a single Attribute by name.
|
org.w3c.dom.Attr |
getAttributeNode(java.lang.String attrName)
Look up a single Attribute by name.
|
org.w3c.dom.Attr |
getAttributeNodeNS(java.lang.String namespaceURI,
java.lang.String localName)
Retrieves an Attr node by local name and namespace URI.
|
java.lang.String |
getAttributeNS(java.lang.String namespaceURI,
java.lang.String localName)
Introduced in DOM Level 2.
|
java.lang.String |
getClassName() |
java.lang.String |
getDir() |
org.w3c.dom.NodeList |
getElementsByTagName(java.lang.String tagName)
Returns a NodeList of all descendent nodes (children,
grandchildren, and so on) which are Elements and which have the
specified tag name.
|
org.w3c.dom.NodeList |
getElementsByTagNameNS(java.lang.String namespaceURI,
java.lang.String localName)
Introduced in DOM Level 2.
|
org.w3c.dom.html.HTMLFormElement |
getForm()
Convenience method returns the form in which this form element is contained.
|
java.lang.String |
getId() |
java.lang.String |
getLang() |
java.lang.String |
getTitle() |
void |
setClassName(java.lang.String className) |
void |
setDir(java.lang.String dir) |
void |
setId(java.lang.String id) |
void |
setLang(java.lang.String lang) |
void |
setTitle(java.lang.String title) |
cloneNode, getAttributes, getBaseURI, getChildElementCount, getDefaultAttributes, getFirstElementChild, getLastElementChild, getNextElementSibling, getNodeName, getNodeType, getPreviousElementSibling, getSchemaTypeInfo, getTagName, getTypeName, getTypeNamespace, getXercesAttribute, getXMLBaseAttribute, hasAttribute, hasAttributeNS, hasAttributes, isDerivedFrom, isEqualNode, normalize, reconcileDefaultAttributes, removeAttribute, removeAttributeNode, removeAttributeNS, setAttribute, setAttributeNode, setAttributeNodeNS, setAttributeNS, setIdAttribute, setIdAttributeNode, setIdAttributeNS, setOwnerDocument, setReadOnly, setupDefaultAttributes, setXercesAttributeNode, synchronizeDatagetChildNodes, getChildNodesUnoptimized, getFirstChild, getLastChild, getLength, getOwnerDocument, getTextContent, hasChildNodes, insertBefore, item, removeChild, replaceChild, setTextContent, synchronizeChildrengetNextSibling, getParentNode, getPreviousSiblingaddEventListener, appendChild, changed, changes, compareDocumentPosition, compareTreePosition, dispatchEvent, getContainer, getFeature, getLocalName, getNamespaceURI, getNodeNumber, getNodeValue, getPrefix, getReadOnly, getUserData, getUserData, getUserDataRecord, isDefaultNamespace, isSameNode, isSupported, lookupNamespaceURI, lookupPrefix, needsSyncChildren, removeEventListener, setNodeValue, setPrefix, setUserData, setUserData, toStringclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitgetSchemaTypeInfo, getTagName, hasAttribute, hasAttributeNS, removeAttribute, removeAttributeNode, removeAttributeNS, setAttribute, setAttributeNode, setAttributeNodeNS, setAttributeNS, setIdAttribute, setIdAttributeNode, setIdAttributeNSappendChild, cloneNode, 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 HTMLElementImpl(HTMLDocumentImpl owner, java.lang.String tagName)
owner - The owner HTML documenttagName - The element's tag namepublic java.lang.String getId()
getId in interface org.w3c.dom.html.HTMLElementpublic void setId(java.lang.String id)
setId in interface org.w3c.dom.html.HTMLElementpublic java.lang.String getTitle()
getTitle in interface org.w3c.dom.html.HTMLElementpublic void setTitle(java.lang.String title)
setTitle in interface org.w3c.dom.html.HTMLElementpublic java.lang.String getLang()
getLang in interface org.w3c.dom.html.HTMLElementpublic void setLang(java.lang.String lang)
setLang in interface org.w3c.dom.html.HTMLElementpublic java.lang.String getDir()
getDir in interface org.w3c.dom.html.HTMLElementpublic void setDir(java.lang.String dir)
setDir in interface org.w3c.dom.html.HTMLElementpublic java.lang.String getClassName()
getClassName in interface org.w3c.dom.html.HTMLElementpublic void setClassName(java.lang.String className)
setClassName in interface org.w3c.dom.html.HTMLElementpublic org.w3c.dom.Attr getAttributeNode(java.lang.String attrName)
org.apache.xerces.dom.ElementImplIf no matching attribute is available, returns null.
getAttributeNode in interface org.w3c.dom.ElementgetAttributeNode in class org.apache.xerces.dom.ElementImplpublic org.w3c.dom.Attr getAttributeNodeNS(java.lang.String namespaceURI,
java.lang.String localName)
org.apache.xerces.dom.ElementImplgetAttributeNodeNS in interface org.w3c.dom.ElementgetAttributeNodeNS in class org.apache.xerces.dom.ElementImplnamespaceURI - The namespace URI of the attribute to
retrieve.localName - The local name of the attribute to retrieve.public java.lang.String getAttribute(java.lang.String attrName)
org.apache.xerces.dom.ElementImplNote: Attributes may contain complex node trees. This method returns the "flattened" string obtained from Attribute.getValue(). If you need the structure information, see getAttributeNode().
getAttribute in interface org.w3c.dom.ElementgetAttribute in class org.apache.xerces.dom.ElementImplpublic java.lang.String getAttributeNS(java.lang.String namespaceURI,
java.lang.String localName)
org.apache.xerces.dom.ElementImplRetrieves an attribute value by local name and namespace URI.
getAttributeNS in interface org.w3c.dom.ElementgetAttributeNS in class org.apache.xerces.dom.ElementImplnamespaceURI - The namespace URI of the attribute to
retrieve.localName - The local name of the attribute to retrieve.public final org.w3c.dom.NodeList getElementsByTagName(java.lang.String tagName)
org.apache.xerces.dom.ElementImplNote: NodeList is a "live" view of the DOM. Its contents will change as the DOM changes, and alterations made to the NodeList will be reflected in the DOM.
getElementsByTagName in interface org.w3c.dom.ElementgetElementsByTagName in class org.apache.xerces.dom.ElementImpltagName - The type of element to gather. To obtain a list of
all elements no matter what their names, use the wild-card tag
name "*".DeepNodeListImplpublic final org.w3c.dom.NodeList getElementsByTagNameNS(java.lang.String namespaceURI,
java.lang.String localName)
org.apache.xerces.dom.ElementImplReturns a NodeList of all the Elements with a given local name and namespace URI in the order in which they would be encountered in a preorder traversal of the Document tree, starting from this node.
getElementsByTagNameNS in interface org.w3c.dom.ElementgetElementsByTagNameNS in class org.apache.xerces.dom.ElementImplnamespaceURI - The namespace URI of the elements to match
on. The special value "*" matches all
namespaces. When it is null or an empty
string, this method behaves like
getElementsByTagName.localName - The local name of the elements to match on.
The special value "*" matches all local names.public org.w3c.dom.html.HTMLFormElement getForm()
Copyright ? 1999-2010 The Apache Software Foundation. All Rights Reserved.