<?xml version="1.0" encoding="utf-8"?>
<!-- $Revision$ -->
<refentry xml:id="domimplementation.createdocument" xmlns="http://docbook.org/ns/docbook">
 <refnamediv>
  <refname>DOMImplementation::createDocument</refname>
  <refpurpose>
   Creates a DOMDocument object of the specified type with its document element
  </refpurpose>
 </refnamediv>
 <refsect1 role="description">
  &reftitle.description;
  <methodsynopsis role="DOMImplementation">
   <modifier>public</modifier> <type class="union"><type>DOMDocument</type><type>false</type></type><methodname>DOMImplementation::createDocument</methodname>
   <methodparam choice="opt"><type class="union"><type>string</type><type>null</type></type><parameter>namespace</parameter><initializer>&null;</initializer></methodparam>
   <methodparam choice="opt"><type>string</type><parameter>qualifiedName</parameter><initializer>""</initializer></methodparam>
   <methodparam choice="opt"><type class="union"><type>DOMDocumentType</type><type>null</type></type><parameter>doctype</parameter><initializer>&null;</initializer></methodparam>
  </methodsynopsis>
  <para>
   Creates a <classname>DOMDocument</classname> object of the specified type
   with its document element.
  </para>
 </refsect1>
 <refsect1 role="parameters">
  &reftitle.parameters;
  <para>
   <variablelist>
    <varlistentry>
     <term><parameter>namespace</parameter></term>
     <listitem>
      <para>
       The namespace URI of the document element to create.
      </para>
     </listitem>
    </varlistentry>
    <varlistentry>
     <term><parameter>qualifiedName</parameter></term>
     <listitem>
      <para>
       The qualified name of the document element to create.
      </para>
     </listitem>
    </varlistentry>
    <varlistentry>
     <term><parameter>doctype</parameter></term>
     <listitem>
      <para>
       The type of document to create or &null;.
      </para>
     </listitem>
    </varlistentry>
   </variablelist>
  </para>
 </refsect1>
 <refsect1 role="returnvalues">
  &reftitle.returnvalues;
  <para>
   A new <classname>DOMDocument</classname> object or &false; on error. If
   <parameter>namespace</parameter>, <parameter>qualifiedName</parameter>,
   and <parameter>doctype</parameter> are null, the returned
   <classname>DOMDocument</classname> is empty with no document element
  </para>
 </refsect1>

 <refsect1 role="errors">
  &reftitle.errors;
  <para>
   <variablelist>
    <varlistentry>
     <term><constant>DOM_WRONG_DOCUMENT_ERR</constant></term>
     <listitem>
      <para>
       Raised if <parameter>doctype</parameter> has already been used with a
       different document or was created from a different implementation.
      </para>
     </listitem>
    </varlistentry>
    <varlistentry>
     <term><constant>DOM_NAMESPACE_ERR</constant></term>
     <listitem>
      <para>
       Raised if there is an error with the namespace, as determined by
       <parameter>namespace</parameter> and <parameter>qualifiedName</parameter>.
      </para>
     </listitem>
    </varlistentry>
   </variablelist>
  </para>
 </refsect1>
 <refsect1 role="changelog">
  &reftitle.changelog;
  <para>
   <informaltable>
    <tgroup cols="2">
     <thead>
      <row>
       <entry>&Version;</entry>
       <entry>&Description;</entry>
      </row>
     </thead>
     <tbody>
      <row>
       <entry>8.0.3</entry>
       <entry>
        <parameter>namespace</parameter> is now nullable.
       </entry>
      </row>
      <row>
       <entry>8.0.0</entry>
       <entry>
        <parameter>doctype</parameter> is now nullable.
       </entry>
      </row>
      <row>
       <entry>8.0.0</entry>
       <entry>
        Calling this function statically will
        now throw an <classname>Error</classname>.
        Previously, an <constant>E_DEPRECATED</constant> was raised.
       </entry>
      </row>
     </tbody>
    </tgroup>
   </informaltable>
  </para>
 </refsect1>

 <refsect1 role="seealso">
  &reftitle.seealso;
  <para>
   <simplelist>
    <member><methodname>DOMDocument::__construct</methodname></member>
    <member><methodname>DOMImplementation::createDocumentType</methodname></member>
   </simplelist>
  </para>
 </refsect1>
</refentry>
<!-- Keep this comment at the end of the file
Local variables:
mode: sgml
sgml-omittag:t
sgml-shorttag:t
sgml-minimize-attributes:nil
sgml-always-quote-attributes:t
sgml-indent-step:1
sgml-indent-data:t
indent-tabs-mode:nil
sgml-parent-document:nil
sgml-default-dtd-file:"~/.phpdoc/manual.ced"
sgml-exposed-tags:nil
sgml-local-catalogs:nil
sgml-local-ecat-files:nil
End:
vim600: syn=xml fen fdm=syntax fdl=2 si
vim: et tw=78 syn=sgml
vi: ts=1 sw=1
-->
