public interface DOMDocument extends DOMEventTarget
| Modifier and Type | Method and Description |
|---|---|
DOMElement |
createElement(java.lang.String text)
Creates and returns a new Element DOM node.
|
DOMText |
createTextNode(java.lang.String text)
Creates and returns a new Text DOM node.
|
DOMElement |
getBody()
Returns
BODY element of this document. |
boolean |
getDesignMode()
Returns status of design mode
|
DOMElement |
getDocumentElement()
Returns topmost HTML element in the current document.
|
DOMElement |
getElementAtPoint(java.awt.Point point)
Finds HTML element on the document at the given
point. |
DOMElement |
getElementById(java.lang.String elementId)
Returns first HTML element in this document with
ID attribute equals to elementId or
null if document doesn't contains HTML element with passed ID attribute. |
DOMNodeList |
getElementsByName(java.lang.String name)
Returns list of HTML elements with the
name attribute. |
DOMNodeList |
getElementsByTagName(java.lang.String tagName)
Returns list of HTML elements with the
tagName. |
java.lang.String |
getTitle()
Returns the title of this document.
|
java.lang.String |
getURL()
Returns URL of this document.
|
void |
setDesignMode(boolean value)
Enables/Disables design mode for document.
|
void |
setTitle(java.lang.String title)
Sets a new title for this document.
|
addEventListener, removeEventListenerboolean getDesignMode()
void setDesignMode(boolean value)
value - - true if design mode need to be enabledjava.lang.String getTitle()
void setTitle(java.lang.String title)
title - a new title for this document.java.lang.String getURL()
DOMElement getBody()
BODY element of this document.BODY element of this document.DOMNodeList getElementsByName(java.lang.String name)
name attribute.name - the name attribute value.name were found.DOMElement getDocumentElement()
DOMNodeList getElementsByTagName(java.lang.String tagName)
tagName.tagName - the tag name.DOMElement getElementById(java.lang.String elementId)
ID attribute equals to elementId or
null if document doesn't contains HTML element with passed ID attribute.elementId - element's ID attribute value.null.DOMElement createElement(java.lang.String text)
text - the string, which will be used to initialize node value.DOMText createTextNode(java.lang.String text)
text - the string, which will be used to initialize node value.DOMElement getElementAtPoint(java.awt.Point point)
point.point - represents XY coordinate relative to the upper-left
corner of the client area. Cannot be null.point or null.java.lang.IllegalArgumentException - when point is null.