|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.xerces.dom.NodeImpl
org.apache.xerces.dom.ChildNode
org.apache.xerces.dom.ParentNode
org.apache.xerces.dom.ElementImpl
org.apache.html.dom.HTMLElementImpl
public class HTMLElementImpl
Implements an HTML-specific element, an 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 Form| Field Summary |
|---|
| Fields inherited from interface org.w3c.dom.TypeInfo |
|---|
DERIVATION_EXTENSION, DERIVATION_LIST, DERIVATION_RESTRICTION, DERIVATION_UNION |
| Constructor Summary | |
|---|---|
HTMLElementImpl(HTMLDocumentImpl owner,
java.lang.String tagName)
Constructor required owner document and element tag name. |
|
| Method Summary | |
|---|---|
java.lang.String |
getAttribute(java.lang.String attrName)
Look up a single Attribute by name. |
Attr |
getAttributeNode(java.lang.String attrName)
Look up a single Attribute by name. |
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()
The class attribute of the element. |
java.lang.String |
getDir()
Specifies the base direction of directionally neutraltext and the directionality of tables. |
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. |
NodeList |
getElementsByTagNameNS(java.lang.String namespaceURI,
java.lang.String localName)
Introduced in DOM Level 2. |
HTMLFormElement |
getForm()
Convenience method returns the form in which this form element is contained. |
java.lang.String |
getId()
The element's identifier. |
java.lang.String |
getLang()
Language code defined in RFC 1766. |
java.lang.String |
getTitle()
The element's advisory title. |
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)
|
| Methods inherited from class org.apache.xerces.dom.ElementImpl |
|---|
cloneNode, getAttributes, getBaseURI, getNodeName, getNodeType, getSchemaTypeInfo, getTagName, getTypeName, getTypeNamespace, hasAttribute, hasAttributeNS, hasAttributes, isDerivedFrom, isEqualNode, normalize, removeAttribute, removeAttributeNode, removeAttributeNS, setAttribute, setAttributeNode, setAttributeNodeNS, setAttributeNS, setIdAttribute, setIdAttributeNode, setIdAttributeNS, setReadOnly |
| Methods inherited from class org.apache.xerces.dom.ParentNode |
|---|
getChildNodes, getFirstChild, getLastChild, getLength, getOwnerDocument, getTextContent, hasChildNodes, insertBefore, item, removeChild, replaceChild, setTextContent |
| Methods inherited from class org.apache.xerces.dom.ChildNode |
|---|
getNextSibling, getParentNode, getPreviousSibling |
| Methods inherited from class org.apache.xerces.dom.NodeImpl |
|---|
addEventListener, appendChild, compareDocumentPosition, compareTreePosition, dispatchEvent, getFeature, getLocalName, getNamespaceURI, getNodeValue, getPrefix, getReadOnly, getUserData, getUserData, isDefaultNamespace, isSameNode, isSupported, lookupNamespaceURI, lookupPrefix, needsSyncChildren, removeEventListener, setNodeValue, setPrefix, setUserData, setUserData, toString |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface org.w3c.dom.Element |
|---|
getSchemaTypeInfo, getTagName, hasAttribute, hasAttributeNS, removeAttribute, removeAttributeNode, removeAttributeNS, setAttribute, setAttributeNode, setAttributeNodeNS, setAttributeNS, setIdAttribute, setIdAttributeNode, setIdAttributeNS |
| Methods inherited from interface org.w3c.dom.Node |
|---|
appendChild, 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, setUserData |
| Constructor Detail |
|---|
public HTMLElementImpl(HTMLDocumentImpl owner,
java.lang.String tagName)
owner - The owner HTML documenttagName - The element's tag name| Method Detail |
|---|
public java.lang.String getId()
HTMLElement
getId in interface HTMLElementpublic void setId(java.lang.String id)
setId in interface HTMLElementpublic java.lang.String getTitle()
HTMLElement
getTitle in interface HTMLElementpublic void setTitle(java.lang.String title)
setTitle in interface HTMLElementpublic java.lang.String getLang()
HTMLElement
getLang in interface HTMLElementpublic void setLang(java.lang.String lang)
setLang in interface HTMLElementpublic java.lang.String getDir()
HTMLElement
getDir in interface HTMLElementpublic void setDir(java.lang.String dir)
setDir in interface HTMLElementpublic java.lang.String getClassName()
HTMLElement
getClassName in interface HTMLElementpublic void setClassName(java.lang.String className)
setClassName in interface HTMLElementpublic Attr getAttributeNode(java.lang.String attrName)
ElementImplIf no matching attribute is available, returns null.
getAttributeNode in interface ElementgetAttributeNode in class ElementImplattrName - The name (nodeName) of the attribute to
retrieve.
Attr node with the specified name (
nodeName) or null if there is no such
attribute.
public Attr getAttributeNodeNS(java.lang.String namespaceURI,
java.lang.String localName)
ElementImpl
getAttributeNodeNS in interface ElementgetAttributeNodeNS in class 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)
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 ElementgetAttribute in class ElementImplattrName - The name of the attribute to retrieve.
Attr value as a string, or the empty string
if that attribute does not have a specified or default value.
public java.lang.String getAttributeNS(java.lang.String namespaceURI,
java.lang.String localName)
ElementImplRetrieves an attribute value by local name and namespace URI.
getAttributeNS in interface ElementgetAttributeNS in class ElementImplnamespaceURI - The namespace URI of the attribute to
retrieve.localName - The local name of the attribute to retrieve.
public final NodeList getElementsByTagName(java.lang.String tagName)
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 ElementgetElementsByTagName in class 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 "*".
Element nodes.DeepNodeListImpl
public final NodeList getElementsByTagNameNS(java.lang.String namespaceURI,
java.lang.String localName)
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 ElementgetElementsByTagNameNS in class 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 HTMLFormElement getForm()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||