MCPcopy Create free account
hub / github.com/CyanogenMod/android_libcore / Document

Interface Document

luni/src/main/java/org/w3c/dom/Document.java:27–814  ·  view source on GitHub ↗

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 <cod

Source from the content-addressed store, hash-verified

25 * <p>See also the <a href='http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407'>Document Object Model (DOM) Level 3 Core Specification</a>.
26 */
27public interface Document extends Node {
28 /**
29 * The Document Type Declaration (see <code>DocumentType</code>)
30 * associated with this document. For XML documents without a document
31 * type declaration this returns <code>null</code>. For HTML documents,
32 * a <code>DocumentType</code> object may be returned, independently of
33 * the presence or absence of document type declaration in the HTML
34 * document.
35 * <br>This provides direct access to the <code>DocumentType</code> node,
36 * child node of this <code>Document</code>. This node can be set at
37 * document creation time and later changed through the use of child
38 * nodes manipulation methods, such as <code>Node.insertBefore</code>,
39 * or <code>Node.replaceChild</code>. Note, however, that while some
40 * implementations may instantiate different types of
41 * <code>Document</code> objects supporting additional features than the
42 * "Core", such as "HTML" [<a href='http://www.w3.org/TR/2003/REC-DOM-Level-2-HTML-20030109'>DOM Level 2 HTML</a>]
43 * , based on the <code>DocumentType</code> specified at creation time,
44 * changing it afterwards is very unlikely to result in a change of the
45 * features supported.
46 * @version DOM Level 3
47 */
48 public DocumentType getDoctype();
49
50 /**
51 * The <code>DOMImplementation</code> object that handles this document. A
52 * DOM application may use objects from multiple implementations.
53 */
54 public DOMImplementation getImplementation();
55
56 /**
57 * This is a convenience attribute that allows direct access to the child
58 * node that is the document element of the document.
59 */
60 public Element getDocumentElement();
61
62 /**
63 * Creates an element of the type specified. Note that the instance
64 * returned implements the <code>Element</code> interface, so attributes
65 * can be specified directly on the returned object.
66 * <br>In addition, if there are known attributes with default values,
67 * <code>Attr</code> nodes representing them are automatically created
68 * and attached to the element.
69 * <br>To create an element with a qualified name and namespace URI, use
70 * the <code>createElementNS</code> method.
71 * @param tagName The name of the element type to instantiate. For XML,
72 * this is case-sensitive, otherwise it depends on the
73 * case-sensitivity of the markup language in use. In that case, the
74 * name is mapped to the canonical form of that markup by the DOM
75 * implementation.
76 * @return A new <code>Element</code> object with the
77 * <code>nodeName</code> attribute set to <code>tagName</code>, and
78 * <code>localName</code>, <code>prefix</code>, and
79 * <code>namespaceURI</code> set to <code>null</code>.
80 * @exception DOMException
81 * INVALID_CHARACTER_ERR: Raised if the specified name is not an XML
82 * name according to the XML version in use specified in the
83 * <code>Document.xmlVersion</code> attribute.
84 */

Callers 170

runTestMethod · 0.95
runTestMethod · 0.95
runTestMethod · 0.95
runTestMethod · 0.95
runTestMethod · 0.95
runTestMethod · 0.95
runTestMethod · 0.95
runTestMethod · 0.95
runTestMethod · 0.95
runTestMethod · 0.95
runTestMethod · 0.95
runTestMethod · 0.95

Implementers 1

DocumentImplluni/src/main/java/org/apache/harmony/

Calls

no outgoing calls

Tested by

no test coverage detected