org.apache.html.dom
public class HTMLDocumentImpl extends DocumentImpl implements HTMLDocument
Several methods create new nodes of all basic types (comment, text, element, etc.). These methods create new nodes but do not place them in the document tree. The nodes may be placed in the document tree using {@link org.w3c.dom.Node#appendChild} or {@link org.w3c.dom.Node#insertBefore}, or they may be placed in some other document tree.
Note: <FRAMESET> documents are not supported at the moment, neither are direct document writing ({@link #open}, {@link #write}) and HTTP attribute methods ({@link #getURL}, {@link #getCookie}).
Version: $Revision: 1.21 $ $Date: 2005/04/18 00:41:07 $
See Also: org.w3c.dom.html.HTMLDocument
UNKNOWN:
Constructor Summary | |
---|---|
HTMLDocumentImpl() |
Method Summary | |
---|---|
Node | cloneNode(boolean deep) |
void | close() |
Attr | createAttribute(String name)
Creates an Attribute having this Document as its OwnerDoc.
|
Element | createElement(String tagName) |
Element | createElementNS(String namespaceURI, String qualifiedName, String localpart)
Xerces-specific constructor. |
Element | createElementNS(String namespaceURI, String qualifiedName) |
HTMLCollection | getAnchors() |
HTMLCollection | getApplets() |
HTMLElement | getBody() |
String | getCookie() |
Element | getDocumentElement() |
String | getDomain() |
Element | getElementById(String elementId) |
NodeList | getElementsByName(String elementName) |
NodeList | getElementsByTagName(String tagName) |
NodeList | getElementsByTagNameNS(String namespaceURI, String localName) |
HTMLCollection | getForms() |
HTMLElement | getHead()
Obtains the <HEAD> element in the document, creating one if does
not exist before. |
HTMLCollection | getImages() |
HTMLCollection | getLinks() |
String | getReferrer() |
String | getTitle() |
String | getURL() |
void | open() |
void | setBody(HTMLElement newBody) |
void | setCookie(String cookie) |
void | setTitle(String newTitle) |
void | write(String text) |
void | writeln(String text) |
Parameters: name The name of the attribute
Returns: An attribute whose name is all lower case
Throws: DOMException(INVALID_NAME_ERR) if the attribute name is not acceptable
Parameters: namespaceURI The namespace URI of the element to create. qualifiedName The qualified name of the element type to instantiate. localName The local name of the element to instantiate.
Returns: Element A new Element object with the following attributes:
Throws: DOMException INVALID_CHARACTER_ERR: Raised if the specified name contains an invalid character.
Called by {@link #getTitle}, {@link #setTitle}, {@link #getBody} and {@link #setBody} to assure the document has the <HEAD> element correctly placed.
Returns: The <HEAD> element