|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
This is the base interface for DOM nodes, as obtained from using
XMLParser
methods. Methods for iterating over and accessing
values from nodes are supplied here.
Field Summary | |
static short |
ATTRIBUTE_NODE
The constant 2 denotes DOM nodes of type Attribute. |
static short |
CDATA_SECTION_NODE
The constant 4 denotes DOM nodes of type CdataSection. |
static short |
COMMENT_NODE
The constant 8 denotes DOM nodes of type Comment. |
static short |
DOCUMENT_FRAGMENT_NODE
The constant 11 denotes DOM nodes of type DocumentFragment. |
static short |
DOCUMENT_NODE
The constant 9 denotes DOM nodes of type Document. |
static short |
DOCUMENT_TYPE_NODE
The constant 10 denotes DOM nodes of type DocumentType. |
static short |
ELEMENT_NODE
The constant 1 denotes DOM nodes of type Element. |
static short |
ENTITY_NODE
The constant 6 denotes DOM nodes of type Entity. |
static short |
ENTITY_REFERENCE_NODE
The constant 5 denotes DOM nodes of type EntityReference. |
static short |
NOTATION_NODE
The constant 12 denotes DOM nodes of type Notation. |
static short |
PROCESSING_INSTRUCTION_NODE
The constant 7 denotes DOM nodes of type ProcessingInstruction. |
static short |
TEXT_NODE
The constant 3 denotes DOM nodes of type Text. |
Method Summary | |
Node |
appendChild(Node newChild)
This method appends child newChild . |
Node |
cloneNode(boolean deep)
This method copies this Node . |
NamedNodeMap |
getAttributes()
This method retrieves the attributes. |
NodeList |
getChildNodes()
This method retrieves the child nodes. |
Node |
getFirstChild()
This method retrieves the first child. |
Node |
getLastChild()
This method retrieves the last child. |
java.lang.String |
getNamespaceURI()
This method retrieves the namespace URI. |
Node |
getNextSibling()
This method retrieves the next sibling. |
java.lang.String |
getNodeName()
This method retrieves the name. |
short |
getNodeType()
This method retrieves the type. |
java.lang.String |
getNodeValue()
This method retrieves the value. |
Document |
getOwnerDocument()
This method retrieves the owner document. |
Node |
getParentNode()
This method retrieves the parent. |
java.lang.String |
getPrefix()
This method retrieves the prefix. |
Node |
getPreviousSibling()
This method retrieves the previous sibling. |
boolean |
hasAttributes()
This method determines whether this Node has any attributes. |
boolean |
hasChildNodes()
This method determines whether this Node has any child
nodes. |
Node |
insertBefore(Node newChild,
Node refChild)
This method inserts before newChild . |
void |
normalize()
This method may collapse adjacent text nodes into one text node, depending on the implementation. |
Node |
removeChild(Node oldChild)
This method removes child oldChild . |
Node |
replaceChild(Node newChild,
Node oldChild)
This method replaces the child oldChild with
newChild . |
void |
setNodeValue(java.lang.String nodeValue)
This method sets the value to nodeValue . |
Field Detail |
public static final short ELEMENT_NODE
public static final short ATTRIBUTE_NODE
public static final short TEXT_NODE
public static final short CDATA_SECTION_NODE
public static final short ENTITY_REFERENCE_NODE
public static final short ENTITY_NODE
public static final short PROCESSING_INSTRUCTION_NODE
public static final short COMMENT_NODE
public static final short DOCUMENT_NODE
public static final short DOCUMENT_TYPE_NODE
public static final short DOCUMENT_FRAGMENT_NODE
public static final short NOTATION_NODE
Method Detail |
public Node appendChild(Node newChild)
newChild
.
newChild
- the Node
to be added
Node
appendedpublic Node cloneNode(boolean deep)
Node
.
deep
- whether to recurse to children
Node
clonedpublic NamedNodeMap getAttributes()
Node
public NodeList getChildNodes()
Node
public Node getFirstChild()
Node
public Node getLastChild()
Node
public java.lang.String getNamespaceURI()
Node
public Node getNextSibling()
Node
public java.lang.String getNodeName()
Node
public short getNodeType()
Node
public java.lang.String getNodeValue()
Node
public Document getOwnerDocument()
Node
public Node getParentNode()
Node
public java.lang.String getPrefix()
Node
public Node getPreviousSibling()
Node
public boolean hasAttributes()
Node
has any attributes.
true
if this Node
has any attributespublic boolean hasChildNodes()
Node
has any child
nodes.
true
if this Node
has any child nodespublic Node insertBefore(Node newChild, Node refChild)
newChild
.
newChild
- the Node
to be addedrefChild
- the Node
which determines the position to
insert
Node
insertedpublic void normalize()
public Node removeChild(Node oldChild)
oldChild
.
oldChild
- the Node
to be removed
Node
removedpublic Node replaceChild(Node newChild, Node oldChild)
oldChild
with
newChild
.
newChild
- the Node
to be addedoldChild
- the Node
to be removed
Node
replacedpublic void setNodeValue(java.lang.String nodeValue)
nodeValue
.
nodeValue
- the new value
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |