Package com.google.gwt.xml.client
Interface Document
- All Superinterfaces:
Node
Document objects represent XML documents. Each
Document can contain exactly one Element node,
and any number of other node types.-
Field Summary
Fields inherited from interface com.google.gwt.xml.client.Node
ATTRIBUTE_NODE, CDATA_SECTION_NODE, COMMENT_NODE, DOCUMENT_FRAGMENT_NODE, DOCUMENT_NODE, DOCUMENT_TYPE_NODE, ELEMENT_NODE, ENTITY_NODE, ENTITY_REFERENCE_NODE, NOTATION_NODE, PROCESSING_INSTRUCTION_NODE, TEXT_NODE -
Method Summary
Modifier and TypeMethodDescriptioncreateCDATASection(String data) This method creates a newCDATASection.createComment(String data) This method creates a newComment.This method creates a newDocumentFragment.createElement(String tagName) This method creates a newElement.createProcessingInstruction(String target, String data) This method creates a newProcessingInstruction.createTextNode(String data) This method creates a newText.This method retrieves the document element.getElementById(String elementId) This method retrieves the unique descendent elements which has an id ofelementId.getElementsByTagName(String tagname) This method retrieves any descendent elements which have a tag name oftagname.importNode(Node importedNode, boolean deep) This method imports a node into the currentDocument.Methods inherited from interface com.google.gwt.xml.client.Node
appendChild, cloneNode, getAttributes, getChildNodes, getFirstChild, getLastChild, getNamespaceURI, getNextSibling, getNodeName, getNodeType, getNodeValue, getOwnerDocument, getParentNode, getPrefix, getPreviousSibling, hasAttributes, hasChildNodes, insertBefore, normalize, removeChild, replaceChild, setNodeValue
-
Method Details
-
createCDATASection
This method creates a newCDATASection.- Parameters:
data- the data of the newCDATASection- Returns:
- the newly created
CDATASection
-
createComment
This method creates a newComment.- Parameters:
data- the data of the newComment- Returns:
- the newly created
Comment
-
createDocumentFragment
DocumentFragment createDocumentFragment()This method creates a newDocumentFragment.- Returns:
- the newly created
DocumentFragment
-
createElement
This method creates a newElement.- Parameters:
tagName- the tag name of the newElement- Returns:
- the newly created
Element
-
createProcessingInstruction
This method creates a newProcessingInstruction.- Parameters:
target- the target of the newProcessingInstructiondata- the data of the newProcessingInstruction- Returns:
- the newly created
ProcessingInstruction
-
createTextNode
This method creates a newText.- Parameters:
data- the data of the newText- Returns:
- the newly created
Text
-
getDocumentElement
Element getDocumentElement()This method retrieves the document element. Each document has at most oneElementas its direct child, and this node is returned if it exists.nullis returned otherwise.- Returns:
- the document element of this
Document
-
getElementById
This method retrieves the unique descendent elements which has an id ofelementId. Note the attribute which is used as an ID must be supplied in the DTD of the document. It is not sufficient to give theElementto be retrieved an attribute named 'id'.- Returns:
- the
Elementwhich has an id ofelementIdand belongs to thisDocument
-
getElementsByTagName
This method retrieves any descendent elements which have a tag name oftagname.- Returns:
- the
NodeListof elements which has a tag name oftagnameand belong to thisDocument
-
importNode
This method imports a node into the currentDocument.- Parameters:
deep- whether to recurse to children- Returns:
- the node
Nodeimported
-