Content Nodes
The actual data conveyed by an XML document is contained completely within the document element. The following node types map directly to the XML document’s nonstructural parts, such as character data, elements, and attribute values.
Document
Each parsed document causes the creation of a single
Document node in memory. (Empty
Document nodes can be created
through the DOMImplementation
interface.) This interface provides access to the document type
information and the single, top-level Element node that contains the entire
body of the parsed document (the documentElement). It also provides
access to the class factory methods that allow an application to
create new content nodes that were not created by parsing a
document. Table
19-10 shows all attributes and methods of the Document interface.
Name | Type | Read-only | 2.0 | 3.0 |
Attributes | ||||
doctype | DocumentType | |||
documentElement | Element | |||
documentURI | DOMString | |||
domConfig | DOMConfiguration | |||
implementation | DOMImplementation | |||
inputEncoding | DOMString | |||
strictErrorChecking | boolean | |||
xmlEncoding | DOMString ... |
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access