| |
String getNodeType() |
| Returns |
A string specifying the type of node. The respective constants are defined in the
concrete sub-classes: DocumentNode.DOCUMENT_NODE,
FrameNode.FRAME_NODE, DomNode.DOM_NODE and
DialogNode.DIALOG_NODE.
|
| |
String getName() |
| Returns | The tag name of the node. |
| |
String getAttribute(String name) |
| Parameters |
name | The name of the attribute |
| Returns |
The value of the attribute or null if no such attribute is available for the node.
|
| |
String getAttributeIfSpecified(String name) |
| Parameters |
name | The name of the attribute |
| Returns |
The value of the attribute or null if no such attribute is explicitly specified for
the node.
|
| |
boolean isAttributeSpecified(String name) |
| Parameters |
name | The name of the attribute |
| Returns |
True if an attribute is explicitly specified for the node.
|
| |
String getText() |
| Returns |
The whole direct and indirect text content of a node.
|
| |
String getVisibleText() |
| Returns |
The whole direct and indirect visible text content of a node.
|
| |
String getFlatText() |
| Returns |
The whole direct text content of a node.
|
| |
String getVisibleFlatText() |
| Returns |
The whole direct visible text content of a node.
|
| |
String getSimpleText() |
| Returns | The simple text content of a node. |
| |
String getVisibleSimpleText() |
| Returns | The visible simple text content of a node. |
| |
DocumentNode getDocument() |
| Returns |
The document to which this node belongs. A DocumentNode will return
itself, a DialogNode will return null.
|
| |
Browser isBrowserIE() |
| Returns | True for Internet Explorer, false for Mozilla derivatives. |
| |
Browser isBrowserMozilla() |
| Returns | True for Mozilla derivatives, false for Internet Explorer. |
| |
Node getParent() |
| Returns | The parent of the node. |
| |
int getChildCount() |
| Returns | The number of child nodes. |
| |
Node getChild(int index) |
| Parameters |
index | The index of the child node, starting with 0. |
| Returns | The child node at the index. |
| Throws |
IllegalArgumentException |
If index is negative or exceeds the number of child nodes.
|
| |
Node[] getChildren() |
| Returns | The child nodes. |
| |
int getIndexOfChild(Node child) |
| Parameters |
child | The child node to get the index for. |
| Returns |
The index of the child node, starting with 0, or -1 in case it is not a child of the
this node.
|
| |
Node[] getElementsByTagName(String tagName) |
| Parameters |
tagName | The tag name to look for. |
| Returns |
An array of child nodes with the given tag name. If none are found, an empty array is
returned. A DialogNode will always return an empty array, a
FrameNode forwards the call to its DocumentNode child node
and a DocumentNode to its <HTML> root element.
|
| |
Node getElementById(String id) |
| Parameters |
id | The ID to look for. |
| Returns |
The child node with the given ID, an arbitrary one in case of multiple matches or
null if none is found. A DialogNode will always return null, a
FrameNode forwards the call to its DocumentNode child node
and a DocumentNode to its <HTML> root element.
|
| |
Node[] getElementsById(String id) |
| Parameters |
id | The ID to look for. |
| Returns |
An array of child nodes with the given ID. If none are found, an empty
array is returned. A DialogNode will always return an empty array, a
FrameNode forwards the call to its DocumentNode child node
and a DocumentNode to its <HTML> root element.
|
| |
Node[] getElementsByIdAndTagname(String id, String
tagName) |
| Parameters |
id | The ID attribute to look for. |
tagName | The tag name to look for. |
| Returns |
An array of child nodes with the given ID attribute and the given tag name. If none
are found, an empty array is returned. A DialogNode will always return
an empty array, a FrameNode forwards the call to its
DocumentNode child node and a DocumentNode to its
<HTML> root element.
|
| |
3.1+Object getProperty(String name) |
| Parameters |
name | The name of the property to retrieve. |
| Returns | The value of the specified property or null. |
| |
setProperty(String name, Object value) |
| Parameters |
name | The name of the property. |
value |
The property value or null to remove an existing property.
|
| |