public interface

Node

com.google.gwt.xml.client.Node
Known Indirect Subclasses

Class Overview

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.

Summary

Constants
short ATTRIBUTE_NODE The constant 2 denotes DOM nodes of type Attribute.
short CDATA_SECTION_NODE The constant 4 denotes DOM nodes of type CdataSection.
short COMMENT_NODE The constant 8 denotes DOM nodes of type Comment.
short DOCUMENT_FRAGMENT_NODE The constant 11 denotes DOM nodes of type DocumentFragment.
short DOCUMENT_NODE The constant 9 denotes DOM nodes of type Document.
short DOCUMENT_TYPE_NODE The constant 10 denotes DOM nodes of type DocumentType.
short ELEMENT_NODE The constant 1 denotes DOM nodes of type Element.
short ENTITY_NODE The constant 6 denotes DOM nodes of type Entity.
short ENTITY_REFERENCE_NODE The constant 5 denotes DOM nodes of type EntityReference.
short NOTATION_NODE The constant 12 denotes DOM nodes of type Notation.
short PROCESSING_INSTRUCTION_NODE The constant 7 denotes DOM nodes of type ProcessingInstruction.
short TEXT_NODE The constant 3 denotes DOM nodes of type Text.
Public Methods
abstract Node appendChild(Node newChild)
This method appends child newChild.
abstract Node cloneNode(boolean deep)
This method copies this Node.
abstract NamedNodeMap getAttributes()
This method retrieves the attributes.
abstract NodeList getChildNodes()
This method retrieves the child nodes.
abstract Node getFirstChild()
This method retrieves the first child.
abstract Node getLastChild()
This method retrieves the last child.
abstract String getNamespaceURI()
This method retrieves the namespace URI.
abstract Node getNextSibling()
This method retrieves the next sibling.
abstract String getNodeName()
This method retrieves the name.
abstract short getNodeType()
This method retrieves the type.
abstract String getNodeValue()
This method retrieves the value.
abstract Document getOwnerDocument()
This method retrieves the owner document.
abstract Node getParentNode()
This method retrieves the parent.
abstract String getPrefix()
This method retrieves the prefix.
abstract Node getPreviousSibling()
This method retrieves the previous sibling.
abstract boolean hasAttributes()
This method determines whether this Node has any attributes.
abstract boolean hasChildNodes()
This method determines whether this Node has any child nodes.
abstract Node insertBefore(Node newChild, Node refChild)
This method inserts before newChild.
abstract void normalize()
This method may collapse adjacent text nodes into one text node, depending on the implementation.
abstract Node removeChild(Node oldChild)
This method removes child oldChild.
abstract Node replaceChild(Node newChild, Node oldChild)
This method replaces the child oldChild with newChild.
abstract void setNodeValue(String nodeValue)
This method sets the value to nodeValue.

Constants

public static final short ATTRIBUTE_NODE

The constant 2 denotes DOM nodes of type Attribute.

Constant Value: 2 (0x00000002)

public static final short CDATA_SECTION_NODE

The constant 4 denotes DOM nodes of type CdataSection.

Constant Value: 4 (0x00000004)

public static final short COMMENT_NODE

The constant 8 denotes DOM nodes of type Comment.

Constant Value: 8 (0x00000008)

public static final short DOCUMENT_FRAGMENT_NODE

The constant 11 denotes DOM nodes of type DocumentFragment.

Constant Value: 11 (0x0000000b)

public static final short DOCUMENT_NODE

The constant 9 denotes DOM nodes of type Document.

Constant Value: 9 (0x00000009)

public static final short DOCUMENT_TYPE_NODE

The constant 10 denotes DOM nodes of type DocumentType.

Constant Value: 10 (0x0000000a)

public static final short ELEMENT_NODE

The constant 1 denotes DOM nodes of type Element.

Constant Value: 1 (0x00000001)

public static final short ENTITY_NODE

The constant 6 denotes DOM nodes of type Entity.

Constant Value: 6 (0x00000006)

public static final short ENTITY_REFERENCE_NODE

The constant 5 denotes DOM nodes of type EntityReference.

Constant Value: 5 (0x00000005)

public static final short NOTATION_NODE

The constant 12 denotes DOM nodes of type Notation.

Constant Value: 12 (0x0000000c)

public static final short PROCESSING_INSTRUCTION_NODE

The constant 7 denotes DOM nodes of type ProcessingInstruction.

Constant Value: 7 (0x00000007)

public static final short TEXT_NODE

The constant 3 denotes DOM nodes of type Text.

Constant Value: 3 (0x00000003)

Public Methods

public abstract Node appendChild (Node newChild)

This method appends child newChild.

Parameters
newChild the Node to be added
Returns
  • the child Node appended

public abstract Node cloneNode (boolean deep)

This method copies this Node.

Parameters
deep whether to recurse to children
Returns
  • Node cloned

public abstract NamedNodeMap getAttributes ()

This method retrieves the attributes.

Returns
  • the attributes of this Node

public abstract NodeList getChildNodes ()

This method retrieves the child nodes.

Returns
  • the child nodes of this Node

public abstract Node getFirstChild ()

This method retrieves the first child.

Returns
  • the first child of this Node

public abstract Node getLastChild ()

This method retrieves the last child.

Returns
  • the last child of this Node

public abstract String getNamespaceURI ()

This method retrieves the namespace URI.

Returns
  • the namespace URI of this Node

public abstract Node getNextSibling ()

This method retrieves the next sibling.

Returns
  • the next sibling of this Node

public abstract String getNodeName ()

This method retrieves the name.

Returns
  • the name of this Node

public abstract short getNodeType ()

This method retrieves the type.

Returns
  • the type of this Node

public abstract String getNodeValue ()

This method retrieves the value.

Returns
  • the value of this Node

public abstract Document getOwnerDocument ()

This method retrieves the owner document.

Returns
  • the owner document of this Node

public abstract Node getParentNode ()

This method retrieves the parent.

Returns
  • the parent of this Node

public abstract String getPrefix ()

This method retrieves the prefix.

Returns
  • the prefix of this Node

public abstract Node getPreviousSibling ()

This method retrieves the previous sibling.

Returns
  • the previous sibling of this Node

public abstract boolean hasAttributes ()

This method determines whether this Node has any attributes.

Returns
  • true if this Node has any attributes

public abstract boolean hasChildNodes ()

This method determines whether this Node has any child nodes.

Returns
  • true if this Node has any child nodes

public abstract Node insertBefore (Node newChild, Node refChild)

This method inserts before newChild.

Parameters
newChild the Node to be added
refChild the Node which determines the position to insert
Returns
  • the before Node inserted

public abstract void normalize ()

This method may collapse adjacent text nodes into one text node, depending on the implementation. Safari 4.0 and Chrome will also merge CDATA nodes into text nodes, even though they support CDATA nodes as distinct nodes.

public abstract Node removeChild (Node oldChild)

This method removes child oldChild.

Parameters
oldChild the Node to be removed
Returns
  • the child Node removed

public abstract Node replaceChild (Node newChild, Node oldChild)

This method replaces the child oldChild with newChild.

Parameters
newChild the Node to be added
oldChild the Node to be removed
Returns
  • the child Node replaced

public abstract void setNodeValue (String nodeValue)

This method sets the value to nodeValue.

Parameters
nodeValue the new value