<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<!--
Generated: Thu Nov 09 17:42:30 EST 2000 jfouffa.w3.org
-->
<html lang='en' xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Document Object Model Core</title>
<link rel='stylesheet' type='text/css' href='./spec.css' />
<link rel='stylesheet' type='text/css' href='W3C-REC.css' />
<link rel='next' href='changes.html' />
<link rel='contents' href='Overview.html#contents' />
<link rel='index' href='def-index.html' />
<link rel='previous' href='introduction.html' />
</head>
<body>
<div class='navbar' align='center'><a accesskey='p'
href='introduction.html'>previous</a> <a accesskey='n'
href='changes.html'>next</a> <a accesskey='c'
href='Overview.html#contents'>contents</a> <a accesskey='i'
href='def-index.html'>index</a>
<hr title='Navigation area separator' />
</div>
<div class='noprint' style='text-align: right'>
<p style='font-family: monospace;font-size:small'>13 November,
2000</p>
</div>
<div class='div1'><a id="Core" name='Core'></a>
<h1 id='Core-h1' class='div1'>1. Document Object Model Core</h1>
<dl>
<dt><i>Editors</i></dt>
<dd>Arnaud Le Hors, IBM</dd>
<dd>Gavin Nicol, Inso EPS (for DOM Level 1)</dd>
<dd>Lauren Wood, SoftQuad, Inc. (for DOM Level 1)</dd>
<dd>Mike Champion, ArborText (for DOM Level 1 from November 20,
1997)</dd>
<dd>Steve Byrne, JavaSoft (for DOM Level 1 until November 19,
1997)</dd>
</dl>
<div class='noprint'>
<h2 id='table-of-contents'>Table of contents</h2>
<ul class='toc'>
<li class='tocline3'><a class='tocxref' href='#ID-1590626201'>1.1.
Overview of the DOM Core Interfaces</a>
<ul class='toc'>
<li class='tocline4'><a class='tocxref'
href='#ID-1590626202'>1.1.1. The DOM Structure Model</a></li>
<li class='tocline4'><a class='tocxref' href='#ID-249F15BA'>1.1.2.
Memory Management</a></li>
<li class='tocline4'><a class='tocxref' href='#ID-45A944CB'>1.1.3.
Naming Conventions</a></li>
<li class='tocline4'><a class='tocxref' href='#ID-1CED5498'>1.1.4.
Inheritance vs. Flattened Views of the API</a></li>
<li class='tocline4'><a class='tocxref' href='#ID-C74D1578'>1.1.5.
The DOMString type</a></li>
<li class='tocline4'><a class='tocxref'
href='#Core-DOMTimeStamp'>1.1.6. The DOMTimeStamp type</a></li>
<li class='tocline4'><a class='tocxref' href='#ID-5DFED1F0'>1.1.7.
String comparisons in the DOM</a></li>
<li class='tocline4'><a class='tocxref'
href='#Namespaces-Considerations'>1.1.8. XML Namespaces</a></li>
</ul>
</li>
<li class='tocline3'><a class='tocxref' href='#ID-BBACDC08'>1.2.
Fundamental Interfaces</a>
<ul class='toc'>
<li class='tocline4'><a href='#ID-17189187'>DOMException</a>, <a
href='#ID-258A00AF'>ExceptionCode</a>, <a
href='#ID-102161490'>DOMImplementation</a>, <a
href='#ID-B63ED1A3'>DocumentFragment</a>, <a
href='#i-Document'>Document</a>, <a href='#ID-1950641247'>Node</a>,
<a href='#ID-536297177'>NodeList</a>, <a
href='#ID-1780488922'>NamedNodeMap</a>, <a
href='#ID-FF21A306'>CharacterData</a>, <a
href='#ID-637646024'>Attr</a>, <a href='#ID-745549614'>Element</a>,
<a href='#ID-1312295772'>Text</a>, <a
href='#ID-1728279322'>Comment</a></li>
</ul>
</li>
<li class='tocline3'><a class='tocxref' href='#ID-E067D597'>1.3.
Extended Interfaces</a>
<ul class='toc'>
<li class='tocline4'><a href='#ID-667469212'>CDATASection</a>, <a
href='#ID-412266927'>DocumentType</a>, <a
href='#ID-5431D1B9'>Notation</a>, <a
href='#ID-527DCFF2'>Entity</a>, <a
href='#ID-11C98490'>EntityReference</a>, <a
href='#ID-1004215813'>ProcessingInstruction</a></li>
</ul>
</li>
</ul>
</div>
<div class='div2'><a id="ID-1590626201" name='ID-1590626201'></a>
<h2 id='ID-1590626201-h2' class='div2'>1.1. Overview of the DOM
Core Interfaces</h2>
<p>This section defines a set of objects and interfaces for
accessing and manipulating document objects. The functionality
specified in this section (the <em>Core</em> functionality) is
sufficient to allow software developers and web script authors to
access and manipulate parsed HTML and XML content inside conforming
products. The DOM Core API also allows creation and population of a
<a href='core.html#i-Document'><code>Document</code></a> object
using only DOM API calls; loading a <a class='noxref'
href='core.html#i-Document'><code>Document</code></a> and saving it
persistently is left to the product that implements the DOM
API.</p>
<div class='div3'><a id="ID-1590626202" name='ID-1590626202'></a>
<h3 id='ID-1590626202-h3' class='div3'>1.1.1. The DOM Structure
Model</h3>
<p>The DOM presents documents as a hierarchy of <a
href='core.html#ID-1950641247'><code>Node</code></a> objects that
also implement other, more specialized interfaces. Some types of
nodes may have <a href='glossary.html#dt-child'><em>child</em></a>
nodes of various types, and others are leaf nodes that cannot have
anything below them in the document structure. For XML and HTML,
the node types, and which node types they may have as children, are
as follows:</p>
<ul>
<li><a href='core.html#i-Document'><code>Document</code></a> -- <a
href='core.html#ID-745549614'><code>Element</code></a> (maximum of
one), <a
href='core.html#ID-1004215813'><code>ProcessingInstruction</code></a>,
<a href='core.html#ID-1728279322'><code>Comment</code></a>, <a
href='core.html#ID-412266927'><code>DocumentType</code></a>
(maximum of one)</li>
<li><a
href='core.html#ID-B63ED1A3'><code>DocumentFragment</code></a> --
<a href='core.html#ID-745549614'><code>Element</code></a>, <a
href='core.html#ID-1004215813'><code>ProcessingInstruction</code></a>,
<a href='core.html#ID-1728279322'><code>Comment</code></a>, <a
href='core.html#ID-1312295772'><code>Text</code></a>, <a
href='core.html#ID-667469212'><code>CDATASection</code></a>, <a
href='core.html#ID-11C98490'><code>EntityReference</code></a></li>
<li><a href='core.html#ID-412266927'><code>DocumentType</code></a>
-- no children</li>
<li><a
href='core.html#ID-11C98490'><code>EntityReference</code></a> -- <a
href='core.html#ID-745549614'><code>Element</code></a>, <a
href='core.html#ID-1004215813'><code>ProcessingInstruction</code></a>,
<a href='core.html#ID-1728279322'><code>Comment</code></a>, <a
href='core.html#ID-1312295772'><code>Text</code></a>, <a
href='core.html#ID-667469212'><code>CDATASection</code></a>, <a
class='noxref'
href='core.html#ID-11C98490'><code>EntityReference</code></a></li>
<li><a href='core.html#ID-745549614'><code>Element</code></a> -- <a
class='noxref'
href='core.html#ID-745549614'><code>Element</code></a>, <a
href='core.html#ID-1312295772'><code>Text</code></a>, <a
href='core.html#ID-1728279322'><code>Comment</code></a>, <a
href='core.html#ID-1004215813'><code>ProcessingInstruction</code></a>,
<a href='core.html#ID-667469212'><code>CDATASection</code></a>, <a
href='core.html#ID-11C98490'><code>EntityReference</code></a></li>
<li><a href='core.html#ID-637646024'><code>Attr</code></a> -- <a
href='core.html#ID-1312295772'><code>Text</code></a>, <a
href='core.html#ID-11C98490'><code>EntityReference</code></a></li>
<li><a
href='core.html#ID-1004215813'><code>ProcessingInstruction</code></a>
-- no children</li>
<li><a href='core.html#ID-1728279322'><code>Comment</code></a> --
no children</li>
<li><a href='core.html#ID-1312295772'><code>Text</code></a> -- no
children</li>
<li><a href='core.html#ID-667469212'><code>CDATASection</code></a>
-- no children</li>
<li><a href='core.html#ID-527DCFF2'><code>Entity</code></a> -- <a
href='core.html#ID-745549614'><code>Element</code></a>, <a
href='core.html#ID-1004215813'><code>ProcessingInstruction</code></a>,
<a href='core.html#ID-1728279322'><code>Comment</code></a>, <a
href='core.html#ID-1312295772'><code>Text</code></a>, <a
href='core.html#ID-667469212'><code>CDATASection</code></a>, <a
href='core.html#ID-11C98490'><code>EntityReference</code></a></li>
<li><a href='core.html#ID-5431D1B9'><code>Notation</code></a> -- no
children</li>
</ul>
<p>The DOM also specifies a <a
href='c