|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface Node
An XML Node. Currently, only element nodes and character data nodes are supported.
| Field Summary | |
|---|---|
static byte |
CHARDATA
Node type character data. |
static byte |
ELEMENT
Node type element. |
| Method Summary | |
|---|---|
boolean |
equals(Object o)
Returns true if and only if the specified object is also a
Node, they have the same type, their node values are equal,
their attributes are equals as a set, and their children are recursively
equal according to this definition. |
String |
getAttribute(String attrName)
Returns the attribute with the given name. |
String[] |
getAttributeNames()
Returns the names of this Node's attributes. |
List<Attribute> |
getAttributes()
Returns the attributes of this Node. |
List<? extends Node> |
getChildren()
Returns the children of this Node. |
String |
getNodeValue()
Returns the value of this Node. |
byte |
getType()
Returns the node type of this Node. |
int |
hashCode()
Recursively computes a hash code based on the node type, node value, attributes, and children. |
boolean |
isMutable()
Returns true if this Node is mutable,
false otherwise. |
| Field Detail |
|---|
static final byte ELEMENT
Node has a value, attributes, and
children.
static final byte CHARDATA
Node only has a value.
| Method Detail |
|---|
boolean isMutable()
true if this Node is mutable,
false otherwise.
true if mutable, false if immutable.byte getType()
Node.
String getNodeValue()
Node. When the node represents
a character data node, the returned value will be the character data.
When the node represents an element node, the returned value will
by the tag name of the element.
List<Attribute> getAttributes()
Node. In case
the node represents character data, the empty list is returned.
Node.String getAttribute(String attrName)
String[] getAttributeNames()
Node's attributes.
If the node represents character data the returned array is empty.
List<? extends Node> getChildren()
Node.
If the node represents character data the empty list is returned.
Node.boolean equals(Object o)
true if and only if the specified object is also a
Node, they have the same type, their node values are equal,
their attributes are equals as a set, and their children are recursively
equal according to this definition.
equals in class Objectint hashCode()
hashCode in class Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||