API Overview API Index Package Overview Direct link to this page
JDK 1.6
  org.w3c.dom. Document View Source
Author(s)
Since
Version
Serial
Hierarchy
 Node
      Document
Subinterfaces
Description
public interface Document
  The Document interface represents the entire HTML or XML document.
See also:   
Methods
Hide/Show inherited methods
public Node adoptNode (Node source) throws DOMException
  Attempts to adopt a node from another document to this document.
public Attr createAttribute (String name) throws DOMException
  Creates an Attr of the given name.
public Attr createAttributeNS (String namespaceURI, String qualifiedName) throws DOMException
  Creates an attribute of the given qualified name and namespace URI.
public CDATASection createCDATASection (String data) throws DOMException
  Creates a CDATASection node whose value is the specified string.
public Comment createComment (String data)
  Creates a Comment node given the specified string.
public DocumentFragment createDocumentFragment ()
  Creates an empty DocumentFragment object.
public Element createElement (String tagName) throws DOMException
  Creates an element of the type specified.
public Element createElementNS (String namespaceURI, String qualifiedName) throws DOMException
  Creates an element of the given qualified name and namespace URI.
public EntityReference createEntityReference (String name) throws DOMException
  Creates an EntityReference object.
public ProcessingInstruction createProcessingInstruction (String target, String data) throws DOMException
  Creates a ProcessingInstruction node given the specified name and data strings.
public Text createTextNode (String data)
  Creates a Text node given the specified string.
public DocumentType getDoctype ()
  The Document Type Declaration (see DocumentType) associated with this document.
public Element getDocumentElement ()
This is a convenience attribute that allows direct access to the child node that is the document element of the document.
public String getDocumentURI ()
  The location of the document or null if undefined or if the Document was created using DOMImplementation.createDocument.
public DOMConfiguration getDomConfig ()
  The configuration used when Document.normalizeDocument() is invoked.
public Element getElementById (String elementId)
  Returns the Element that has an ID attribute with the given value.
public NodeList getElementsByTagName (String tagname)
  Returns a NodeList of all the Elements in document order with a given tag name and are contained in the document.
public NodeList getElementsByTagNameNS (String namespaceURI, String localName)
  Returns a NodeList of all the Elements with a given local name and namespace URI in document order.
public DOMImplementation getImplementation ()
  The DOMImplementation object that handles this document.
public String getInputEncoding ()
  An attribute specifying the encoding used for this document at the time of the parsing.
public boolean getStrictErrorChecking ()
  An attribute specifying whether error checking is enforced or not.
public String getXmlEncoding ()
  An attribute specifying, as part of the XML declaration, the encoding of this document.
public boolean getXmlStandalone ()
  An attribute specifying, as part of the XML declaration, whether this document is standalone.
public String getXmlVersion ()
  An attribute specifying, as part of the XML declaration, the version number of this document.
public Node importNode (Node importedNode, boolean deep) throws DOMException
  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.
public void normalizeDocument ()
  This method acts as if the document was going through a save and load cycle, putting the document in a "normal" form.
public Node renameNode (Node n, String namespaceURI, String qualifiedName) throws DOMException
  Rename an existing node of type ELEMENT_NODE or ATTRIBUTE_NODE.
public void setDocumentURI (String documentURI)
  The location of the document or null if undefined or if the Document was created using DOMImplementation.createDocument.
public void setStrictErrorChecking (boolean strictErrorChecking)
  An attribute specifying whether error checking is enforced or not.
public void setXmlStandalone (boolean xmlStandalone) throws DOMException
  An attribute specifying, as part of the XML declaration, whether this document is standalone.
public void setXmlVersion (String xmlVersion) throws DOMException
  An attribute specifying, as part of the XML declaration, the version number of this document.
Fields
Hide/Show inherited fields
publicfinalstatic short ATTRIBUTE_NODE = "2" [Inherited From Node]
The node is an Attr.
publicfinalstatic short CDATA_SECTION_NODE = "4" [Inherited From Node]
The node is a CDATASection.
publicfinalstatic short COMMENT_NODE = "8" [Inherited From Node]
The node is a Comment.
publicfinalstatic short DOCUMENT_FRAGMENT_NODE = "11" [Inherited From Node]
The node is a DocumentFragment.
publicfinalstatic short DOCUMENT_NODE = "9" [Inherited From Node]
The node is a Document.
publicfinalstatic short DOCUMENT_POSITION_CONTAINED_BY = "16" [Inherited From Node]
  The node is contained by the reference node.
publicfinalstatic short DOCUMENT_POSITION_CONTAINS = "8" [Inherited From Node]
  The node contains the reference node.
publicfinalstatic short DOCUMENT_POSITION_DISCONNECTED = "1" [Inherited From Node]
  The two nodes are disconnected.
publicfinalstatic short DOCUMENT_POSITION_FOLLOWING = "4" [Inherited From Node]
The node follows the reference node.
publicfinalstatic short DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC = "32" [Inherited From Node]
The determination of preceding versus following is implementation-specific.
publicfinalstatic short DOCUMENT_POSITION_PRECEDING = "2" [Inherited From Node]
The second node precedes the reference node.
publicfinalstatic short DOCUMENT_TYPE_NODE = "10" [Inherited From Node]
The node is a DocumentType.
publicfinalstatic short ELEMENT_NODE = "1" [Inherited From Node]
The node is an Element.
publicfinalstatic short ENTITY_NODE = "6" [Inherited From Node]
The node is an Entity.
publicfinalstatic short ENTITY_REFERENCE_NODE = "5" [Inherited From Node]
The node is an EntityReference.
publicfinalstatic short NOTATION_NODE = "12" [Inherited From Node]
The node is a Notation.
publicfinalstatic short PROCESSING_INSTRUCTION_NODE = "7" [Inherited From Node]
The node is a ProcessingInstruction.
publicfinalstatic short TEXT_NODE = "3" [Inherited From Node]
The node is a Text node.
Generated By: JavaOnTracks Doclet 0.1.4     ©Thibaut Colar