Initial commit of OpenSPARC T2 architecture model.
[OpenSPARC-T2-SAM] / sam-t2 / devtools / amd64 / html / python / lib / node651.html
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
<link rel="STYLESHEET" href="lib.css" type='text/css' />
<link rel="SHORTCUT ICON" href="../icons/pyfav.png" type="image/png" />
<link rel='start' href='../index.html' title='Python Documentation Index' />
<link rel="first" href="lib.html" title='Python Library Reference' />
<link rel='contents' href='contents.html' title="Contents" />
<link rel='index' href='genindex.html' title='Index' />
<link rel='last' href='about.html' title='About this document...' />
<link rel='help' href='about.html' title='About this document...' />
<link rel="next" href="node652.html" />
<link rel="prev" href="module-xml.dom.html" />
<link rel="parent" href="module-xml.dom.html" />
<link rel="next" href="node652.html" />
<meta name='aesop' content='information' />
<title>13.6.1 Module Contents</title>
</head>
<body>
<DIV CLASS="navigation">
<div id='top-navigation-panel' xml:id='top-navigation-panel'>
<table align="center" width="100%" cellpadding="0" cellspacing="2">
<tr>
<td class='online-navigation'><a rel="prev" title="13.6 xml.dom "
href="module-xml.dom.html"><img src='../icons/previous.png'
border='0' height='32' alt='Previous Page' width='32' /></A></td>
<td class='online-navigation'><a rel="parent" title="13.6 xml.dom "
href="module-xml.dom.html"><img src='../icons/up.png'
border='0' height='32' alt='Up One Level' width='32' /></A></td>
<td class='online-navigation'><a rel="next" title="13.6.2 Objects in the"
href="node652.html"><img src='../icons/next.png'
border='0' height='32' alt='Next Page' width='32' /></A></td>
<td align="center" width="100%">Python Library Reference</td>
<td class='online-navigation'><a rel="contents" title="Table of Contents"
href="contents.html"><img src='../icons/contents.png'
border='0' height='32' alt='Contents' width='32' /></A></td>
<td class='online-navigation'><a href="modindex.html" title="Module Index"><img src='../icons/modules.png'
border='0' height='32' alt='Module Index' width='32' /></a></td>
<td class='online-navigation'><a rel="index" title="Index"
href="genindex.html"><img src='../icons/index.png'
border='0' height='32' alt='Index' width='32' /></A></td>
</tr></table>
<div class='online-navigation'>
<b class="navlabel">Previous:</b>
<a class="sectref" rel="prev" href="module-xml.dom.html">13.6 xml.dom </A>
<b class="navlabel">Up:</b>
<a class="sectref" rel="parent" href="module-xml.dom.html">13.6 xml.dom </A>
<b class="navlabel">Next:</b>
<a class="sectref" rel="next" href="node652.html">13.6.2 Objects in the</A>
</div>
<hr /></div>
</DIV>
<!--End of Navigation Panel-->
<H2><A NAME="SECTION0015610000000000000000">
13.6.1 Module Contents</A>
</H2>
<P>
The <tt class="module">xml.dom</tt> contains the following functions:
<P>
<dl><dt><table cellpadding="0" cellspacing="0"><tr valign="baseline">
<td><nobr><b><tt id='l2h-4353' xml:id='l2h-4353' class="function">registerDOMImplementation</tt></b>(</nobr></td>
<td><var>name, factory</var>)</td></tr></table></dt>
<dd>
Register the <var>factory</var> function with the name <var>name</var>. The
factory function should return an object which implements the
<tt class="class">DOMImplementation</tt> interface. The factory function can return
the same object every time, or a new one for each call, as appropriate
for the specific implementation (e.g. if that implementation supports
some customization).
</dl>
<P>
<dl><dt><table cellpadding="0" cellspacing="0"><tr valign="baseline">
<td><nobr><b><tt id='l2h-4354' xml:id='l2h-4354' class="function">getDOMImplementation</tt></b>(</nobr></td>
<td><var></var><big>[</big><var>name</var><big>[</big><var>, features</var><big>]</big><var></var><big>]</big><var></var>)</td></tr></table></dt>
<dd>
Return a suitable DOM implementation. The <var>name</var> is either
well-known, the module name of a DOM implementation, or
<code>None</code>. If it is not <code>None</code>, imports the corresponding
module and returns a <tt class="class">DOMImplementation</tt> object if the import
succeeds. If no name is given, and if the environment variable
<a class="envvar" id='l2h-4359' xml:id='l2h-4359'>PYTHON_DOM</a> is set, this variable is used to find the
implementation.
<P>
If name is not given, this examines the available implementations to
find one with the required feature set. If no implementation can be
found, raise an <tt class="exception">ImportError</tt>. The features list must be a
sequence of <code>(<var>feature</var>, <var>version</var>)</code> pairs which are
passed to the <tt class="method">hasFeature()</tt> method on available
<tt class="class">DOMImplementation</tt> objects.
</dl>
<P>
Some convenience constants are also provided:
<P>
<dl><dt><b><tt id='l2h-4355' xml:id='l2h-4355'>EMPTY_NAMESPACE</tt></b></dt>
<dd>
The value used to indicate that no namespace is associated with a
node in the DOM. This is typically found as the
<tt class="member">namespaceURI</tt> of a node, or used as the <var>namespaceURI</var>
parameter to a namespaces-specific method.
<span class="versionnote">New in version 2.2.</span>
</dd></dl>
<P>
<dl><dt><b><tt id='l2h-4356' xml:id='l2h-4356'>XML_NAMESPACE</tt></b></dt>
<dd>
The namespace URI associated with the reserved prefix <code>xml</code>, as
defined by
<em class="citetitle"><a
href="http://www.w3.org/TR/REC-xml-names/"
title="Namespaces in XML"
>Namespaces in XML</a></em>
(section&nbsp;4).
<span class="versionnote">New in version 2.2.</span>
</dd></dl>
<P>
<dl><dt><b><tt id='l2h-4357' xml:id='l2h-4357'>XMLNS_NAMESPACE</tt></b></dt>
<dd>
The namespace URI for namespace declarations, as defined by
<em class="citetitle"><a
href="http://www.w3.org/TR/DOM-Level-2-Core/core.html"
title="Document
Object Model (DOM) Level&nbsp;2 Core Specification"
>Document
Object Model (DOM) Level&nbsp;2 Core Specification</a></em> (section&nbsp;1.1.8).
<span class="versionnote">New in version 2.2.</span>
</dd></dl>
<P>
<dl><dt><b><tt id='l2h-4358' xml:id='l2h-4358'>XHTML_NAMESPACE</tt></b></dt>
<dd>
The URI of the XHTML namespace as defined by
<em class="citetitle"><a
href="http://www.w3.org/TR/xhtml1/"
title="XHTML 1.0: The Extensible
HyperText Markup Language"
>XHTML 1.0: The Extensible
HyperText Markup Language</a></em> (section&nbsp;3.1.1).
<span class="versionnote">New in version 2.2.</span>
</dd></dl>
<P>
In addition, <tt class="module">xml.dom</tt> contains a base <tt class="class">Node</tt> class and
the DOM exception classes. The <tt class="class">Node</tt> class provided by this
module does not implement any of the methods or attributes defined by
the DOM specification; concrete DOM implementations must provide
those. The <tt class="class">Node</tt> class provided as part of this module does
provide the constants used for the <tt class="member">nodeType</tt> attribute on
concrete <tt class="class">Node</tt> objects; they are located within the class
rather than at the module level to conform with the DOM
specifications.
<P>
<DIV CLASS="navigation">
<div class='online-navigation'>
<p></p><hr />
<table align="center" width="100%" cellpadding="0" cellspacing="2">
<tr>
<td class='online-navigation'><a rel="prev" title="13.6 xml.dom "
href="module-xml.dom.html"><img src='../icons/previous.png'
border='0' height='32' alt='Previous Page' width='32' /></A></td>
<td class='online-navigation'><a rel="parent" title="13.6 xml.dom "
href="module-xml.dom.html"><img src='../icons/up.png'
border='0' height='32' alt='Up One Level' width='32' /></A></td>
<td class='online-navigation'><a rel="next" title="13.6.2 Objects in the"
href="node652.html"><img src='../icons/next.png'
border='0' height='32' alt='Next Page' width='32' /></A></td>
<td align="center" width="100%">Python Library Reference</td>
<td class='online-navigation'><a rel="contents" title="Table of Contents"
href="contents.html"><img src='../icons/contents.png'
border='0' height='32' alt='Contents' width='32' /></A></td>
<td class='online-navigation'><a href="modindex.html" title="Module Index"><img src='../icons/modules.png'
border='0' height='32' alt='Module Index' width='32' /></a></td>
<td class='online-navigation'><a rel="index" title="Index"
href="genindex.html"><img src='../icons/index.png'
border='0' height='32' alt='Index' width='32' /></A></td>
</tr></table>
<div class='online-navigation'>
<b class="navlabel">Previous:</b>
<a class="sectref" rel="prev" href="module-xml.dom.html">13.6 xml.dom </A>
<b class="navlabel">Up:</b>
<a class="sectref" rel="parent" href="module-xml.dom.html">13.6 xml.dom </A>
<b class="navlabel">Next:</b>
<a class="sectref" rel="next" href="node652.html">13.6.2 Objects in the</A>
</div>
</div>
<hr />
<span class="release-info">Release 2.4.2, documentation updated on 28 September 2005.</span>
</DIV>
<!--End of Navigation Panel-->
<ADDRESS>
See <i><a href="about.html">About this document...</a></i> for information on suggesting changes.
</ADDRESS>
</BODY>
</HTML>