org.w3c.dom
Interface Document

All Superinterfaces:
Node sample code for org.w3c.dom.Node definition code for org.w3c.dom.Node
All Known Subinterfaces:
HTMLDocument sample code for org.w3c.dom.html.HTMLDocument definition code for org.w3c.dom.html.HTMLDocument

public interface Document
extends Node sample code for org.w3c.dom.Node definition code for org.w3c.dom.Node

The Document interface represents the entire HTML or XML document. Conceptually, it is the root of the document tree, and provides the primary access to the document's data.

Since elements, text nodes, comments, processing instructions, etc. cannot exist outside the context of a Document, the Document interface also contains the factory methods needed to create these objects. The Node objects created have a ownerDocument attribute which associates them with the Document within whose context they were created.

See also the Document Object Model (DOM) Level 3 Core Specification.


Field Summary
 
Fields inherited from interface org.w3c.dom.Node sample code for org.w3c.dom.Node definition code for org.w3c.dom.Node
ATTRIBUTE_NODE sample code for org.w3c.dom.Node.ATTRIBUTE_NODE definition code for org.w3c.dom.Node.ATTRIBUTE_NODE , CDATA_SECTION_NODE sample code for org.w3c.dom.Node.CDATA_SECTION_NODE definition code for org.w3c.dom.Node.CDATA_SECTION_NODE , COMMENT_NODE sample code for org.w3c.dom.Node.COMMENT_NODE definition code for org.w3c.dom.Node.COMMENT_NODE , DOCUMENT_FRAGMENT_NODE sample code for org.w3c.dom.Node.DOCUMENT_FRAGMENT_NODE definition code for org.w3c.dom.Node.DOCUMENT_FRAGMENT_NODE , DOCUMENT_NODE sample code for org.w3c.dom.Node.DOCUMENT_NODE definition code for org.w3c.dom.Node.DOCUMENT_NODE , DOCUMENT_POSITION_CONTAINED_BY sample code for org.w3c.dom.Node.DOCUMENT_POSITION_CONTAINED_BY definition code for org.w3c.dom.Node.DOCUMENT_POSITION_CONTAINED_BY , DOCUMENT_POSITION_CONTAINS sample code for org.w3c.dom.Node.DOCUMENT_POSITION_CONTAINS definition code for org.w3c.dom.Node.DOCUMENT_POSITION_CONTAINS , DOCUMENT_POSITION_DISCONNECTED sample code for org.w3c.dom.Node.DOCUMENT_POSITION_DISCONNECTED definition code for org.w3c.dom.Node.DOCUMENT_POSITION_DISCONNECTED , DOCUMENT_POSITION_FOLLOWING sample code for org.w3c.dom.Node.DOCUMENT_POSITION_FOLLOWING definition code for org.w3c.dom.Node.DOCUMENT_POSITION_FOLLOWING , DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC sample code for org.w3c.dom.Node.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC definition code for org.w3c.dom.Node.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC , DOCUMENT_POSITION_PRECEDING sample code for org.w3c.dom.Node.DOCUMENT_POSITION_PRECEDING definition code for org.w3c.dom.Node.DOCUMENT_POSITION_PRECEDING , DOCUMENT_TYPE_NODE sample code for org.w3c.dom.Node.DOCUMENT_TYPE_NODE definition code for org.w3c.dom.Node.DOCUMENT_TYPE_NODE , ELEMENT_NODE sample code for org.w3c.dom.Node.ELEMENT_NODE definition code for org.w3c.dom.Node.ELEMENT_NODE , ENTITY_NODE sample code for org.w3c.dom.Node.ENTITY_NODE definition code for org.w3c.dom.Node.ENTITY_NODE , ENTITY_REFERENCE_NODE sample code for org.w3c.dom.Node.ENTITY_REFERENCE_NODE definition code for org.w3c.dom.Node.ENTITY_REFERENCE_NODE , NOTATION_NODE sample code for org.w3c.dom.Node.NOTATION_NODE definition code for org.w3c.dom.Node.NOTATION_NODE , PROCESSING_INSTRUCTION_NODE sample code for org.w3c.dom.Node.PROCESSING_INSTRUCTION_NODE definition code for org.w3c.dom.Node.PROCESSING_INSTRUCTION_NODE , TEXT_NODE sample code for org.w3c.dom.Node.TEXT_NODE definition code for org.w3c.dom.Node.TEXT_NODE
 
Method Summary
 Node sample code for org.w3c.dom.Node definition code for org.w3c.dom.Node adoptNode sample code for org.w3c.dom.Document.adoptNode(org.w3c.dom.Node) definition code for org.w3c.dom.Document.adoptNode(org.w3c.dom.Node) (Node sample code for org.w3c.dom.Node definition code for org.w3c.dom.Node  source)
          Attempts to adopt a node from another document to this document.
 Attr sample code for org.w3c.dom.Attr definition code for org.w3c.dom.Attr createAttribute sample code for org.w3c.dom.Document.createAttribute(java.lang.String) definition code for org.w3c.dom.Document.createAttribute(java.lang.String) (String sample code for java.lang.String definition code for java.lang.String  name)
          Creates an Attr of the given name.
 Attr sample code for org.w3c.dom.Attr definition code for org.w3c.dom.Attr createAttributeNS sample code for org.w3c.dom.Document.createAttributeNS(java.lang.String, java.lang.String) definition code for org.w3c.dom.Document.createAttributeNS(java.lang.String, java.lang.String) (String sample code for java.lang.String definition code for java.lang.String  namespaceURI, String sample code for java.lang.String definition code for java.lang.String  qualifiedName)
          Creates an attribute of the given qualified name and namespace URI.
 CDATASection sample code for org.w3c.dom.CDATASection definition code for org.w3c.dom.CDATASection createCDATASection sample code for org.w3c.dom.Document.createCDATASection(java.lang.String) definition code for org.w3c.dom.Document.createCDATASection(java.lang.String) (String sample code for java.lang.String definition code for java.lang.String  data)
          Creates a CDATASection node whose value is the specified string.
 Comment sample code for org.w3c.dom.Comment definition code for org.w3c.dom.Comment createComment sample code for org.w3c.dom.Document.createComment(java.lang.String) definition code for org.w3c.dom.Document.createComment(java.lang.String) (String sample code for java.lang.String definition code for java.lang.String  data)
          Creates a Comment node given the specified string.
 DocumentFragment sample code for org.w3c.dom.DocumentFragment definition code for org.w3c.dom.DocumentFragment createDocumentFragment sample code for org.w3c.dom.Document.createDocumentFragment() definition code for org.w3c.dom.Document.createDocumentFragment() ()
          Creates an empty DocumentFragment object.
 Element sample code for org.w3c.dom.Element definition code for org.w3c.dom.Element createElement sample code for org.w3c.dom.Document.createElement(java.lang.String) definition code for org.w3c.dom.Document.createElement(java.lang.String) (String sample code for java.lang.String definition code for java.lang.String  tagName)
          Creates an element of the type specified.
 Element sample code for org.w3c.dom.Element definition code for org.w3c.dom.Element createElementNS sample code for org.w3c.dom.Document.createElementNS(java.lang.String, java.lang.String) definition code for org.w3c.dom.Document.createElementNS(java.lang.String, java.lang.String) (String sample code for java.lang.String definition code for java.lang.String  namespaceURI, String sample code for java.lang.String definition code for java.lang.String  qualifiedName)
          Creates an element of the given qualified name and namespace URI.
 EntityReference sample code for org.w3c.dom.EntityReference definition code for org.w3c.dom.EntityReference createEntityReference sample code for org.w3c.dom.Document.createEntityReference(java.lang.String) definition code for org.w3c.dom.Document.createEntityReference(java.lang.String) (String sample code for java.lang.String definition code for java.lang.String  name)
          Creates an EntityReference object.
 ProcessingInstruction sample code for org.w3c.dom.ProcessingInstruction definition code for org.w3c.dom.ProcessingInstruction createProcessingInstruction sample code for org.w3c.dom.Document.createProcessingInstruction(java.lang.String, java.lang.String) definition code for org.w3c.dom.Document.createProcessingInstruction(java.lang.String, java.lang.String) (String sample code for java.lang.String definition code for java.lang.String  target, String sample code for java.lang.String definition code for java.lang.String  data)
          Creates a ProcessingInstruction node given the specified name and data strings.
 Text sample code for org.w3c.dom.Text definition code for org.w3c.dom.Text createTextNode sample code for org.w3c.dom.Document.createTextNode(java.lang.String) definition code for org.w3c.dom.Document.createTextNode(java.lang.String) (String sample code for java.lang.String definition code for java.lang.String  data)
          Creates a Text node given the specified string.
 DocumentType sample code for org.w3c.dom.DocumentType definition code for org.w3c.dom.DocumentType getDoctype sample code for org.w3c.dom.Document.getDoctype() definition code for org.w3c.dom.Document.getDoctype() ()
          The Document Type Declaration (see DocumentType) associated with this document.
 Element sample code for org.w3c.dom.Element definition code for org.w3c.dom.Element getDocumentElement sample code for org.w3c.dom.Document.getDocumentElement() definition code for org.w3c.dom.Document.getDocumentElement() ()
          This is a convenience attribute that allows direct access to the child node that is the document element of the document.
 String sample code for java.lang.String definition code for java.lang.String getDocumentURI sample code for org.w3c.dom.Document.getDocumentURI() definition code for org.w3c.dom.Document.getDocumentURI() ()
          The location of the document or null if undefined or if the Document was created using DOMImplementation.createDocument.
 DOMConfiguration sample code for org.w3c.dom.DOMConfiguration definition code for org.w3c.dom.DOMConfiguration getDomConfig sample code for org.w3c.dom.Document.getDomConfig() definition code for org.w3c.dom.Document.getDomConfig() ()
          The configuration used when Document.normalizeDocument() is invoked.
 Element sample code for org.w3c.dom.Element definition code for org.w3c.dom.Element getElementById sample code for org.w3c.dom.Document.getElementById(java.lang.String) definition code for org.w3c.dom.Document.getElementById(java.lang.String) (String sample code for java.lang.String definition code for java.lang.String  elementId)
          Returns the Element that has an ID attribute with the given value.
 NodeList sample code for org.w3c.dom.NodeList definition code for org.w3c.dom.NodeList getElementsByTagName sample code for org.w3c.dom.Document.getElementsByTagName(java.lang.String) definition code for org.w3c.dom.Document.getElementsByTagName(java.lang.String) (String sample code for java.lang.String definition code for java.lang.String  tagname)
          Returns a NodeList of all the Elements in document order with a given tag name and are contained in the document.
 NodeList sample code for org.w3c.dom.NodeList definition code for org.w3c.dom.NodeList getElementsByTagNameNS sample code for org.w3c.dom.Document.getElementsByTagNameNS(java.lang.String, java.lang.String) definition code for org.w3c.dom.Document.getElementsByTagNameNS(java.lang.String, java.lang.String) (String sample code for java.lang.String definition code for java.lang.String  namespaceURI, String sample code for java.lang.String definition code for java.lang.String  localName)
          Returns a NodeList of all the Elements with a given local name and namespace URI in document order.
 DOMImplementation sample code for org.w3c.dom.DOMImplementation definition code for org.w3c.dom.DOMImplementation getImplementation sample code for org.w3c.dom.Document.getImplementation() definition code for org.w3c.dom.Document.getImplementation() ()
          The DOMImplementation object that handles this document.
 String sample code for java.lang.String definition code for java.lang.String getInputEncoding sample code for org.w3c.dom.Document.getInputEncoding() definition code for org.w3c.dom.Document.getInputEncoding() ()
          An attribute specifying the encoding used for this document at the time of the parsing.
 boolean getStrictErrorChecking sample code for org.w3c.dom.Document.getStrictErrorChecking() definition code for org.w3c.dom.Document.getStrictErrorChecking() ()
          An attribute specifying whether error checking is enforced or not.
 String sample code for java.lang.String definition code for java.lang.String getXmlEncoding sample code for org.w3c.dom.Document.getXmlEncoding() definition code for org.w3c.dom.Document.getXmlEncoding() ()
          An attribute specifying, as part of the XML declaration, the encoding of this document.
 boolean getXmlStandalone sample code for org.w3c.dom.Document.getXmlStandalone() definition code for org.w3c.dom.Document.getXmlStandalone() ()
          An attribute specifying, as part of the XML declaration, whether this document is standalone.
 String sample code for java.lang.String definition code for java.lang.String getXmlVersion sample code for org.w3c.dom.Document.getXmlVersion() definition code for org.w3c.dom.Document.getXmlVersion() ()
          An attribute specifying, as part of the XML declaration, the version number of this document.
 Node sample code for org.w3c.dom.Node definition code for org.w3c.dom.Node importNode sample code for org.w3c.dom.Document.importNode(org.w3c.dom.Node, boolean) definition code for org.w3c.dom.Document.importNode(org.w3c.dom.Node, boolean) (Node sample code for org.w3c.dom.Node definition code for org.w3c.dom.Node  importedNode, boolean deep)
          Imports a node from another document to this document, without altering or removing the source node from the original document; this method creates a new copy of the source node.
 void normalizeDocument sample code for org.w3c.dom.Document.normalizeDocument() definition code for org.w3c.dom.Document.normalizeDocument() ()
          This method acts as if the document was going through a save and load cycle, putting the document in a "normal" form.
 Node sample code for org.w3c.dom.Node definition code for org.w3c.dom.Node renameNode sample code for org.w3c.dom.Document.renameNode(org.w3c.dom.Node, java.lang.String, java.lang.String) definition code for org.w3c.dom.Document.renameNode(org.w3c.dom.Node, java.lang.String, java.lang.String) (Node sample code for org.w3c.dom.Node definition code for org.w3c.dom.Node  n, String sample code for java.lang.String definition code for java.lang.String  namespaceURI, String sample code for java.lang.String definition code for java.lang.String  qualifiedName)
          Rename an existing node of type ELEMENT_NODE or ATTRIBUTE_NODE.
 void setDocumentURI sample code for org.w3c.dom.Document.setDocumentURI(java.lang.String) definition code for org.w3c.dom.Document.setDocumentURI(java.lang.String) (String sample code for java.lang.String definition code for java.lang.String  documentURI)
          The location of the document or null if undefined or if the Document was created using DOMImplementation.createDocument.
 void setStrictErrorChecking sample code for org.w3c.dom.Document.setStrictErrorChecking(boolean) definition code for org.w3c.dom.Document.setStrictErrorChecking(boolean) (boolean strictErrorChecking)
          An attribute specifying whether error checking is enforced or not.
 void setXmlStandalone sample code for org.w3c.dom.Document.setXmlStandalone(boolean) definition code for org.w3c.dom.Document.setXmlStandalone(boolean) (boolean xmlStandalone)
          An attribute specifying, as part of the XML declaration, whether this document is standalone.
 void setXmlVersion sample code for org.w3c.dom.Document.setXmlVersion(java.lang.String) definition code for org.w3c.dom.Document.setXmlVersion(java.lang.String) (String sample code for java.lang.String definition code for java.lang.String  xmlVersion)
          An attribute specifying, as part of the XML declaration, the version number of this document.
 
Methods inherited from interface org.w3c.dom.Node sample code for org.w3c.dom.Node definition code for org.w3c.dom.Node
appendChild sample code for org.w3c.dom.Node.appendChild(org.w3c.dom.Node) definition code for org.w3c.dom.Node.appendChild(org.w3c.dom.Node) , cloneNode sample code for org.w3c.dom.Node.cloneNode(boolean) definition code for org.w3c.dom.Node.cloneNode(boolean) , compareDocumentPosition sample code for org.w3c.dom.Node.compareDocumentPosition(org.w3c.dom.Node) definition code for org.w3c.dom.Node.compareDocumentPosition(org.w3c.dom.Node) , getAttributes sample code for org.w3c.dom.Node.getAttributes() definition code for org.w3c.dom.Node.getAttributes() , getBaseURI sample code for org.w3c.dom.Node.getBaseURI() definition code for org.w3c.dom.Node.getBaseURI() , getChildNodes sample code for org.w3c.dom.Node.getChildNodes() definition code for org.w3c.dom.Node.getChildNodes() , getFeature sample code for org.w3c.dom.Node.getFeature(java.lang.String, java.lang.String) definition code for org.w3c.dom.Node.getFeature(java.lang.String, java.lang.String) , getFirstChild sample code for org.w3c.dom.Node.getFirstChild() definition code for org.w3c.dom.Node.getFirstChild() , getLastChild sample code for org.w3c.dom.Node.getLastChild() definition code for org.w3c.dom.Node.getLastChild() , getLocalName sample code for org.w3c.dom.Node.getLocalName() definition code for org.w3c.dom.Node.getLocalName() , getNamespaceURI sample code for org.w3c.dom.Node.getNamespaceURI() definition code for org.w3c.dom.Node.getNamespaceURI() , getNextSibling sample code for org.w3c.dom.Node.getNextSibling() definition code for org.w3c.dom.Node.getNextSibling() , getNodeName sample code for org.w3c.dom.Node.getNodeName() definition code for org.w3c.dom.Node.getNodeName() , getNodeType sample code for org.w3c.dom.Node.getNodeType() definition code for org.w3c.dom.Node.getNodeType() , getNodeValue sample code for org.w3c.dom.Node.getNodeValue() definition code for org.w3c.dom.Node.getNodeValue() , getOwnerDocument sample code for org.w3c.dom.Node.getOwnerDocument() definition code for org.w3c.dom.Node.getOwnerDocument() , getParentNode sample code for org.w3c.dom.Node.getParentNode() definition code for org.w3c.dom.Node.getParentNode() , getPrefix sample code for org.w3c.dom.Node.getPrefix() definition code for org.w3c.dom.Node.getPrefix() , getPreviousSibling sample code for org.w3c.dom.Node.getPreviousSibling() definition code for org.w3c.dom.Node.getPreviousSibling() , getTextContent sample code for org.w3c.dom.Node.getTextContent() definition code for org.w3c.dom.Node.getTextContent() , getUserData sample code for org.w3c.dom.Node.getUserData(java.lang.String) definition code for org.w3c.dom.Node.getUserData(java.lang.String) , hasAttributes sample code for org.w3c.dom.Node.hasAttributes() definition code for org.w3c.dom.Node.hasAttributes() , hasChildNodes sample code for org.w3c.dom.Node.hasChildNodes() definition code for org.w3c.dom.Node.hasChildNodes() , insertBefore sample code for org.w3c.dom.Node.insertBefore(org.w3c.dom.Node, org.w3c.dom.Node) definition code for org.w3c.dom.Node.insertBefore(org.w3c.dom.Node, org.w3c.dom.Node) , isDefaultNamespace sample code for org.w3c.dom.Node.isDefaultNamespace(java.lang.String) definition code for org.w3c.dom.Node.isDefaultNamespace(java.lang.String) , isEqualNode sample code for org.w3c.dom.Node.isEqualNode(org.w3c.dom.Node) definition code for org.w3c.dom.Node.isEqualNode(org.w3c.dom.Node) , isSameNode sample code for org.w3c.dom.Node.isSameNode(org.w3c.dom.Node) definition code for org.w3c.dom.Node.isSameNode(org.w3c.dom.Node) , isSupported sample code for org.w3c.dom.Node.isSupported(java.lang.String, java.lang.String) definition code for org.w3c.dom.Node.isSupported(java.lang.String, java.lang.String) , lookupNamespaceURI sample code for org.w3c.dom.Node.lookupNamespaceURI(java.lang.String) definition code for org.w3c.dom.Node.lookupNamespaceURI(java.lang.String) , lookupPrefix sample code for org.w3c.dom.Node.lookupPrefix(java.lang.String) definition code for org.w3c.dom.Node.lookupPrefix(java.lang.String) , normalize sample code for org.w3c.dom.Node.normalize() definition code for org.w3c.dom.Node.normalize() , removeChild sample code for org.w3c.dom.Node.removeChild(org.w3c.dom.Node) definition code for org.w3c.dom.Node.removeChild(org.w3c.dom.Node) , replaceChild sample code for org.w3c.dom.Node.replaceChild(org.w3c.dom.Node, org.w3c.dom.Node) definition code for org.w3c.dom.Node.replaceChild(org.w3c.dom.Node, org.w3c.dom.Node) , setNodeValue sample code for org.w3c.dom.Node.setNodeValue(java.lang.String) definition code for org.w3c.dom.Node.setNodeValue(java.lang.String) , setPrefix sample code for org.w3c.dom.Node.setPrefix(java.lang.String) definition code for org.w3c.dom.Node.setPrefix(java.lang.String) , setTextContent sample code for org.w3c.dom.Node.setTextContent(java.lang.String) definition code for org.w3c.dom.Node.setTextContent(java.lang.String) , setUserData sample code for org.w3c.dom.Node.setUserData(java.lang.String, java.lang.Object, org.w3c.dom.UserDataHandler) definition code for org.w3c.dom.Node.setUserData(java.lang.String, java.lang.Object, org.w3c.dom.UserDataHandler)
 

Method Detail

getDoctype sample code for org.w3c.dom.Document.getDoctype() definition code for org.w3c.dom.Document.getDoctype()

DocumentType sample code for org.w3c.dom.DocumentType definition code for org.w3c.dom.DocumentType  getDoctype()
The Document Type Declaration (see DocumentType) associated with this document. For XML documents without a document type declaration this returns null. For HTML documents, a DocumentType object may be returned, independently of the presence or absence of document type declaration in the HTML document.
This provides direct access to the DocumentType node, child node of this Document. This node can be set at document creation time and later changed through the use of child nodes manipulation methods, such as Node.insertBefore, or Node.replaceChild. Note, however, that while some implementations may instantiate different types of Document objects supporting additional features than the "Core", such as "HTML" [DOM Level 2 HTML] , based on the DocumentType specified at creation time, changing it afterwards is very unlikely to result in a change of the features supported.


getImplementation sample code for org.w3c.dom.Document.getImplementation() definition code for org.w3c.dom.Document.getImplementation()

DOMImplementation sample code for org.w3c.dom.DOMImplementation definition code for org.w3c.dom.DOMImplementation  getImplementation()
The DOMImplementation object that handles this document. A DOM application may use objects from multiple implementations.


getDocumentElement sample code for org.w3c.dom.Document.getDocumentElement() definition code for org.w3c.dom.Document.getDocumentElement()

Element sample code for org.w3c.dom.Element definition code for org.w3c.dom.Element  getDocumentElement()
This is a convenience attribute that allows direct access to the child node that is the document element of the document.


createElement sample code for org.w3c.dom.Document.createElement(java.lang.String) definition code for org.w3c.dom.Document.createElement(java.lang.String)

Element sample code for org.w3c.dom.Element definition code for org.w3c.dom.Element  createElement(String sample code for java.lang.String definition code for java.lang.String  tagName)
                      throws DOMException sample code for org.w3c.dom.DOMException definition code for org.w3c.dom.DOMException 
Creates an element of the type specified. Note that the instance returned implements the Element interface, so attributes can be specified directly on the returned object.
In addition, if there are known attributes with default values, Attr nodes representing them are automatically created and attached to the element.
To create an element with a qualified name and namespace URI, use the createElementNS method.

Parameters:
tagName - The name of the element type to instantiate. For XML, this is case-sensitive, otherwise it depends on the case-sensitivity of the markup language in use. In that case, the name is mapped to the canonical form of that markup by the DOM implementation.
Returns:
A new Element object with the nodeName attribute set to tagName, and localName, prefix, and namespaceURI set to null.
Throws:
DOMException sample code for org.w3c.dom.DOMException definition code for org.w3c.dom.DOMException - INVALID_CHARACTER_ERR: Raised if the specified name is not an XML name according to the XML version in use specified in the Document.xmlVersion attribute.

createDocumentFragment sample code for org.w3c.dom.Document.createDocumentFragment() definition code for org.w3c.dom.Document.createDocumentFragment()

DocumentFragment sample code for org.w3c.dom.DocumentFragment definition code for org.w3c.dom.DocumentFragment  createDocumentFragment()
Creates an empty DocumentFragment object.

Returns:
A new DocumentFragment.

createTextNode sample code for org.w3c.dom.Document.createTextNode(java.lang.String) definition code for org.w3c.dom.Document.createTextNode(java.lang.String)

Text sample code for org.w3c.dom.Text definition code for org.w3c.dom.Text  createTextNode(String sample code for java.lang.String definition code for java.lang.String  data)
Creates a Text node given the specified string.

Parameters:
data - The data for the node.
Returns:
The new Text object.

createComment sample code for org.w3c.dom.Document.createComment(java.lang.String) definition code for org.w3c.dom.Document.createComment(java.lang.String)

Comment sample code for org.w3c.dom.Comment definition code for org.w3c.dom.Comment  createComment(String sample code for java.lang.String definition code for java.lang.String  data)
Creates a Comment node given the specified string.

Parameters:
data - The data for the node.
Returns:
The new Comment object.

createCDATASection sample code for org.w3c.dom.Document.createCDATASection(java.lang.String) definition code for org.w3c.dom.Document.createCDATASection(java.lang.String)

CDATASection sample code for org.w3c.dom.CDATASection definition code for org.w3c.dom.CDATASection  createCDATASection(String sample code for java.lang.String definition code for java.lang.String  data)
                                throws DOMException sample code for org.w3c.dom.DOMException definition code for org.w3c.dom.DOMException 
Creates a CDATASection node whose value is the specified string.

Parameters:
data - The data for the CDATASection contents.
Returns:
The new CDATASection object.
Throws:
DOMException sample code for org.w3c.dom.DOMException definition code for org.w3c.dom.DOMException - NOT_SUPPORTED_ERR: Raised if this document is an HTML document.

createProcessingInstruction sample code for org.w3c.dom.Document.createProcessingInstruction(java.lang.String, java.lang.String) definition code for org.w3c.dom.Document.createProcessingInstruction(java.lang.String, java.lang.String)

ProcessingInstruction sample code for org.w3c.dom.ProcessingInstruction definition code for org.w3c.dom.ProcessingInstruction  createProcessingInstruction(String sample code for java.lang.String definition code for java.lang.String  target,
                                                  String sample code for java.lang.String definition code for java.lang.String  data)
                                                  throws DOMException sample code for org.w3c.dom.DOMException definition code for org.w3c.dom.DOMException 
Creates a ProcessingInstruction node given the specified name and data strings.

Parameters:
target - The target part of the processing instruction.Unlike Document.createElementNS or Document.createAttributeNS, no namespace well-formed checking is done on the target name. Applications should invoke Document.normalizeDocument() with the parameter " namespaces" set to true in order to ensure that the target name is namespace well-formed.
data - The data for the node.
Returns:
The new ProcessingInstruction object.
Throws:
DOMException sample code for org.w3c.dom.DOMException