org.apache.html.dom

Class HTMLElementImpl

Implemented Interfaces:
Element, HTMLElement, TypeInfo
Known Direct Subclasses:
HTMLAnchorElementImpl, HTMLAppletElementImpl, HTMLAreaElementImpl, HTMLBaseElementImpl, HTMLBaseFontElementImpl, HTMLBodyElementImpl, HTMLBRElementImpl, HTMLButtonElementImpl, HTMLDirectoryElementImpl, HTMLDivElementImpl, HTMLDListElementImpl, HTMLFieldSetElementImpl, HTMLFontElementImpl, HTMLFormElementImpl, HTMLFrameElementImpl, HTMLFrameSetElementImpl, HTMLHeadElementImpl, HTMLHeadingElementImpl, HTMLHRElementImpl, HTMLHtmlElementImpl, HTMLIFrameElementImpl, HTMLImageElementImpl, HTMLInputElementImpl, HTMLIsIndexElementImpl, HTMLLabelElementImpl, HTMLLegendElementImpl, HTMLLinkElementImpl, HTMLLIElementImpl, HTMLMapElementImpl, HTMLMenuElementImpl, HTMLMetaElementImpl, HTMLModElementImpl, HTMLObjectElementImpl, HTMLOListElementImpl, HTMLOptGroupElementImpl, HTMLOptionElementImpl, HTMLParagraphElementImpl, HTMLParamElementImpl, HTMLPreElementImpl, HTMLQuoteElementImpl, HTMLScriptElementImpl, HTMLSelectElementImpl, HTMLStyleElementImpl, HTMLTableCaptionElementImpl, HTMLTableCellElementImpl, HTMLTableColElementImpl, HTMLTableElementImpl, HTMLTableRowElementImpl, HTMLTableSectionElementImpl, HTMLTextAreaElementImpl, HTMLTitleElementImpl, HTMLUListElementImpl

public class HTMLElementImpl
extends org.apache.xerces.dom.ElementImpl
implements HTMLElement

Implements an HTML-specific element, an 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.
Version:
$Revision: 449313 $ $Date: 2006-09-23 18:01:43 -0400 (Sat, 23 Sep 2006) $
Author:
Assaf Arkin
See Also:
org.w3c.dom.html.HTMLElement

Field Summary

Fields inherited from class org.apache.xerces.dom.ElementImpl

attributes, name

Fields inherited from class org.apache.xerces.dom.ParentNode

fNodeListCache, firstChild, ownerDocument

Constructor Summary

HTMLElementImpl(HTMLDocumentImpl owner, String tagName)
Constructor required owner document and element tag name.

Method Summary

String
getAttribute(String attrName)
String
getAttributeNS(String namespaceURI, String localName)
Attr
getAttributeNode(String attrName)
Attr
getAttributeNodeNS(String namespaceURI, String localName)
String
getClassName()
String
getDir()
NodeList
getElementsByTagName(String tagName)
NodeList
getElementsByTagNameNS(String namespaceURI, String localName)
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)

Methods inherited from class org.apache.xerces.dom.ElementImpl

cloneNode, getAttribute, getAttributeNS, getAttributeNode, getAttributeNodeNS, getAttributes, getBaseURI, getDefaultAttributes, getElementsByTagName, getElementsByTagNameNS, getNodeName, getNodeType, getSchemaTypeInfo, getTagName, getTypeName, getTypeNamespace, getXercesAttribute, hasAttribute, hasAttributeNS, hasAttributes, isDerivedFrom, isEqualNode, normalize, reconcileDefaultAttributes, removeAttribute, removeAttributeNS, removeAttributeNode, setAttribute, setAttributeNS, setAttributeNode, setAttributeNodeNS, setIdAttribute, setIdAttributeNS, setIdAttributeNode, setOwnerDocument, setReadOnly, setXercesAttributeNode, setupDefaultAttributes, synchronizeData

Methods inherited from class org.apache.xerces.dom.ParentNode

cloneNode, getChildNodes, getChildNodesUnoptimized, getFirstChild, getLastChild, getLength, getOwnerDocument, getTextContent, hasChildNodes, insertBefore, isEqualNode, item, normalize, removeChild, replaceChild, setOwnerDocument, setReadOnly, setTextContent, synchronizeChildren

Constructor Details

HTMLElementImpl

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.
Parameters:
owner - The owner HTML document
tagName - The element's tag name

Method Details

getAttribute

public String getAttribute(String attrName)
Overrides:
getAttribute in interface org.apache.xerces.dom.ElementImpl

getAttributeNS

public String getAttributeNS(String namespaceURI,
                             String localName)
Overrides:
getAttributeNS in interface org.apache.xerces.dom.ElementImpl

getAttributeNode

public Attr getAttributeNode(String attrName)
Overrides:
getAttributeNode in interface org.apache.xerces.dom.ElementImpl

getAttributeNodeNS

public Attr getAttributeNodeNS(String namespaceURI,
                               String localName)
Overrides:
getAttributeNodeNS in interface org.apache.xerces.dom.ElementImpl

getClassName

public String getClassName()

getDir

public String getDir()

getElementsByTagName

public final NodeList getElementsByTagName(String tagName)
Overrides:
getElementsByTagName in interface org.apache.xerces.dom.ElementImpl

getElementsByTagNameNS

public final NodeList getElementsByTagNameNS(String namespaceURI,
                                             String localName)
Overrides:
getElementsByTagNameNS in interface org.apache.xerces.dom.ElementImpl

getForm

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

public String getId()

getLang

public String getLang()

getTitle

public String getTitle()

setClassName

public void setClassName(String className)

setDir

public void setDir(String dir)

setId

public void setId(String id)

setLang

public void setLang(String lang)

setTitle

public void setTitle(String title)

Copyright © 1999-2007 The Apache Software Foundation. All Rights Reserved.