org.w3c.dom.Element that
will only appear inside HTML documents. This element extends org.apache.xerces.dom.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.
org.w3c.dom.html.HTMLElement
| Modifier and Type | Field and Description |
|---|---|
| private static final long |
| Access | Constructor and Description |
|---|---|
| public | HTMLElementImpl(HTMLDocumentImpl
The owner HTML document owner, String The element's tag name tagName)Constructor required owner document and element tag name. |
| Modifier and Type | Method and Description |
|---|---|
| pack-priv String | Returns: The capitalized valueThe value of the attribute value)Convenience method used to capitalize a one-off attribute value before it is returned. |
| public String | getAttribute(String
The name of the attribute to retrieve. attrName)Overrides org. Implements org. |
| public Attr | getAttributeNode(String
The name ( attrName)nodeName) of the attribute to
retrieve.Overrides org. Implements org. |
| public Attr | getAttributeNodeNS(String
The namespace URI of the attribute to retrieve. namespaceURI, String The local name of the attribute to retrieve. localName)Overrides org. Implements org. Attr node by local name and namespace URI.
|
| public String | getAttributeNS(String
The namespace URI of the attribute to retrieve. namespaceURI, String The local name of the attribute to retrieve. localName)Overrides org. Implements org. |
| pack-priv boolean | |
| pack-priv String | Returns: The capitalized valueThe name of the attribute name)Convenience method used to capitalize a one-off attribute value before it is returned. |
| public String | getClassName()
Implements org. |
| public String | getDir()
Implements org. |
| public final NodeList | getElementsByTagName(String
The name of the tag to match on. The special value "*"
matches all tags. tagName)Overrides org. Implements org. NodeList of all descendant Elements
with a given tag name, in document order.
|
| public final NodeList | getElementsByTagNameNS(String
The namespace URI of the elements to match on. The
special value "*" matches all namespaces. namespaceURI, String The local name of the elements to match on. The
special value "*" matches all local names. localName)Overrides org. Implements org. NodeList of all the descendant
Elements with a given local name and namespace URI in
document order.
|
| public HTMLFormElement | |
| public String | |
| pack-priv int | Returns: The integer value, or zero if not a valid numeric stringThe value of the attribute value)Convenience method used to translate an attribute value into an integer value. |
| public String | |
| public String | |
| pack-priv void | setAttribute(String
The name of the attribute name, boolean The value of the attribute value)Convenience method used to set a boolean attribute. |
| public void | |
| public void | |
| public void | |
| public void | |
| public void |
| serialVersionUID | back to summary |
|---|---|
| private static final long serialVersionUID | |
| HTMLElementImpl | back to summary |
|---|---|
| public HTMLElementImpl(HTMLDocumentImpl owner, String tagName) Constructor required owner document and element tag name. Will be called by the constructor of specific element types but with a known tag name. Assures that the owner document is an HTML element.
| |
| capitalize | back to summary |
|---|---|
| pack-priv String capitalize(String value) Convenience method used to capitalize a one-off attribute value before it is returned. For example, the align values "LEFT" and "left" will both return as "Left". | |
| getAttribute | back to summary |
|---|---|
| public String getAttribute(String attrName) Overrides org. Implements org. Doc from org. Retrieves an attribute value by name. | |
| getAttributeNode | back to summary |
|---|---|
| public Attr getAttributeNode(String attrName) Overrides org. Implements org. Doc from org. Retrieves an attribute node by name.
| |
| getAttributeNodeNS | back to summary |
|---|---|
| public Attr getAttributeNodeNS(String namespaceURI, String localName) Overrides org. Implements org. Doc from org. Retrieves an | |
| getAttributeNS | back to summary |
|---|---|
| public String getAttributeNS(String namespaceURI, String localName) Overrides org. Implements org. Doc from org. Retrieves an attribute value by local name and namespace URI.
| |
| getBinary | back to summary |
|---|---|
| pack-priv boolean getBinary(String name) Convenience method used to translate an attribute value into a boolean value. If the attribute has an associated value (even an empty string), it is set and true is returned. If the attribute does not exist, false is returend.
| |
| getCapitalized | back to summary |
|---|---|
| pack-priv String getCapitalized(String name) Convenience method used to capitalize a one-off attribute value before it is returned. For example, the align values "LEFT" and "left" will both return as "Left". | |
| getClassName | back to summary |
|---|---|
| public String getClassName() Implements org. Doc from org. The class attribute of the element. This attribute has been renamed due to conflicts with the "class" keyword exposed by many languages. See the class attribute definition in HTML 4.0. | |
| getDir | back to summary |
|---|---|
| public String getDir() Implements org. Doc from org. Specifies the base direction of directionally neutral text and the directionality of tables. See the dir attribute definition in HTML 4.0. | |
| getElementsByTagName | back to summary |
|---|---|
| public final NodeList getElementsByTagName(String tagName) Overrides org. Implements org. Doc from org. Returns a | |
| getElementsByTagNameNS | back to summary |
|---|---|
| public final NodeList getElementsByTagNameNS(String namespaceURI, String localName) Overrides org. Implements org. Doc from org. Returns a
| |
| getForm | back to summary |
|---|---|
| public HTMLFormElement getForm() Convenience method returns the form in which this form element is contained. This method is exposed for form elements through the DOM API, but other elements have no access to it through the API. | |
| getId | back to summary |
|---|---|
| public String getId() Implements org. Doc from org. The element's identifier. See the id attribute definition in HTML 4.0. | |
| getInteger | back to summary |
|---|---|
| pack-priv int getInteger(String value) Convenience method used to translate an attribute value into an integer value. Returns the integer value or zero if the attribute is not a valid numeric string.
| |
| getLang | back to summary |
|---|---|
| public String getLang() Implements org. Doc from org. Language code defined in RFC 1766. See the lang attribute definition in HTML 4.0. | |
| getTitle | back to summary |
|---|---|
| public String getTitle() Implements org. Doc from org. The element's advisory title. See the title attribute definition in HTML 4.0. | |
| setAttribute | back to summary |
|---|---|
| pack-priv void setAttribute(String name, boolean value) Convenience method used to set a boolean attribute. If the value is true, the attribute is set to an empty string. If the value is false, the attribute is removed. HTML 4.0 understands empty strings as set attributes.
| |
| setClassName | back to summary |
|---|---|
| public void setClassName(String className) Implements org. | |
| setDir | back to summary |
|---|---|
| public void setDir(String dir) Implements org. | |
| setId | back to summary |
|---|---|
| public void setId(String id) Implements org. | |
| setLang | back to summary |
|---|---|
| public void setLang(String lang) Implements org. | |
| setTitle | back to summary |
|---|---|
| public void setTitle(String title) Implements org. | |