Package com.google.gwt.xml.client
Interface Document
-
-
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
All Methods Instance Methods Abstract Methods Modifier and Type Method Description CDATASection
createCDATASection(java.lang.String data)
This method creates a newCDATASection
.Comment
createComment(java.lang.String data)
This method creates a newComment
.DocumentFragment
createDocumentFragment()
This method creates a newDocumentFragment
.Element
createElement(java.lang.String tagName)
This method creates a newElement
.ProcessingInstruction
createProcessingInstruction(java.lang.String target, java.lang.String data)
This method creates a newProcessingInstruction
.Text
createTextNode(java.lang.String data)
This method creates a newText
.Element
getDocumentElement()
This method retrieves the document element.Element
getElementById(java.lang.String elementId)
This method retrieves the unique descendent elements which has an id ofelementId
.NodeList
getElementsByTagName(java.lang.String tagname)
This method retrieves any descendent elements which have a tag name oftagname
.Node
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 Detail
-
createCDATASection
CDATASection createCDATASection(java.lang.String data)
This method creates a newCDATASection
.- Parameters:
data
- the data of the newCDATASection
- Returns:
- the newly created
CDATASection
-
createComment
Comment createComment(java.lang.String data)
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
Element createElement(java.lang.String tagName)
This method creates a newElement
.- Parameters:
tagName
- the tag name of the newElement
- Returns:
- the newly created
Element
-
createProcessingInstruction
ProcessingInstruction createProcessingInstruction(java.lang.String target, java.lang.String data)
This method creates a newProcessingInstruction
.- Parameters:
target
- the target of the newProcessingInstruction
data
- the data of the newProcessingInstruction
- Returns:
- the newly created
ProcessingInstruction
-
createTextNode
Text createTextNode(java.lang.String data)
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 oneElement
as its direct child, and this node is returned if it exists.null
is returned otherwise.- Returns:
- the document element of this
Document
-
getElementById
Element getElementById(java.lang.String elementId)
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 theElement
to be retrieved an attribute named 'id'.- Returns:
- the
Element
which has an id ofelementId
and belongs to thisDocument
-
getElementsByTagName
NodeList getElementsByTagName(java.lang.String tagname)
This method retrieves any descendent elements which have a tag name oftagname
.- Returns:
- the
NodeList
of elements which has a tag name oftagname
and belong to thisDocument
-
-