title: How to add DOCTYPE in export xml?
body: <p>I exported a xml file in PHP using:</p>
  
  <pre><code>$xmldoc = new DOMDocument();        
  $xmldoc-&gt;formatOutput = true;
  $xmldoc-&gt;encoding="Shift_JIS";
  
  // create root nodes
  $root = $xmldoc-&gt;createElement("TableData");
  $xmldoc-&gt;appendChild( $root );
  $xmldoc-&gt;save($filename);
  </code></pre>
  
  <p>Result: </p>
  
  <pre><code>&lt;?xml version="1.0" encoding="Shift_JIS"?&gt;
  &lt;TableData&gt; &lt;/TableData&gt;
  </code></pre>
  
  <p>Now, i want to add row  <code>&lt;!DOCTYPE TableDef SYSTEM "TableData.dtd"&gt;</code> like:</p>
  
  <pre><code>    &lt;?xml version="1.0" encoding="Shift_JIS"?&gt;
      &lt;!DOCTYPE TableDef SYSTEM "TableData.dtd"&gt;
     &lt;TableData&gt; &lt;/TableData&gt;
  </code></pre>
  
  <p>How to add <code>DOCTYPE</code> in an exported xml? Thanks.</p>