public interface

Document

implements Node
com.google.gwt.xml.client.Document

Class Overview

Document objects represent XML documents. Each Document can contain exactly one Element node, and any number of other node types.

Summary

[Expand]
Inherited Constants
From interface com.google.gwt.xml.client.Node
Public Methods
abstract CDATASection createCDATASection(String data)
This method creates a new CDATASection.
abstract Comment createComment(String data)
This method creates a new Comment.
abstract DocumentFragment createDocumentFragment()
This method creates a new DocumentFragment.
abstract Element createElement(String tagName)
This method creates a new Element.
abstract ProcessingInstruction createProcessingInstruction(String target, String data)
This method creates a new ProcessingInstruction.
abstract Text createTextNode(String data)
This method creates a new Text.
abstract Element getDocumentElement()
This method retrieves the document element.
abstract Element getElementById(String elementId)
This method retrieves the unique descendent elements which has an id of elementId.
abstract NodeList getElementsByTagName(String tagname)
This method retrieves any descendent elements which have a tag name of tagname.
abstract Node importNode(Node importedNode, boolean deep)
This method imports a node into the current Document.
[Expand]
Inherited Methods
From interface com.google.gwt.xml.client.Node

Public Methods

public abstract CDATASection createCDATASection (String data)

This method creates a new CDATASection.

Parameters
data the data of the new CDATASection
Returns
  • the newly created CDATASection

public abstract Comment createComment (String data)

This method creates a new Comment.

Parameters
data the data of the new Comment
Returns
  • the newly created Comment

public abstract DocumentFragment createDocumentFragment ()

This method creates a new DocumentFragment.

Returns
  • the newly created DocumentFragment

public abstract Element createElement (String tagName)

This method creates a new Element.

Parameters
tagName the tag name of the new Element
Returns
  • the newly created Element

public abstract ProcessingInstruction createProcessingInstruction (String target, String data)

This method creates a new ProcessingInstruction.

Parameters
target the target of the new ProcessingInstruction
data the data of the new ProcessingInstruction
Returns
  • the newly created ProcessingInstruction

public abstract Text createTextNode (String data)

This method creates a new Text.

Parameters
data the data of the new Text
Returns
  • the newly created Text

public abstract Element getDocumentElement ()

This method retrieves the document element. Each document has at most one Element as its direct child, and this node is returned if it exists. null is returned otherwise.

Returns
  • the document element of this Document

public abstract Element getElementById (String elementId)

This method retrieves the unique descendent elements which has an id of elementId. Note the attribute which is used as an ID must be supplied in the DTD of the document. It is not sufficient to give the Element to be retrieved an attribute named 'id'.

Returns
  • the Element which has an id of elementId and belongs to this Document

public abstract NodeList getElementsByTagName (String tagname)

This method retrieves any descendent elements which have a tag name of tagname.

Returns
  • the NodeList of elements which has a tag name of tagname and belong to this Document

public abstract Node importNode (Node importedNode, boolean deep)

This method imports a node into the current Document.

Parameters
deep whether to recurse to children
Returns
  • the node Node imported