title: DOMDocument howto
body: <p>Simple question, how to do this with DOMDocument ??</p>
  
  <pre><code>&lt;backend&gt;
      &lt;type value="File" /&gt;
      &lt;cache_dir&gt;
          &lt;zf:const zf:name="APPLICATION_PATH"/&gt;.cache&lt;/cache_dir&gt;
  &lt;/backend&gt;
  </code></pre>
  
  <p>without having the following result:</p>
  
  <pre><code>&lt;backend&gt;
      &lt;type value="File"/&gt;
      &lt;cache_dir&gt;&amp;lt;zf:const zf:name="APPLICATION_PATH"/&amp;gt;.cache&lt;/cache_dir&gt;
  &lt;/backend&gt;
  </code></pre>
  
  <p>Here what I did:</p>
  
  <pre><code>$backendNode = $paramsNode-&gt;appendChild($cnfXml-&gt;createElement('backend'));
  $backendNode-&gt;appendChild($cnfXml-&gt;createElement('type'))-&gt;setAttribute('value', 'File');
  $pathnode = $backendNode-&gt;appendChild($cnfXml-&gt;createElement('cache_dir'));
  $pathnode-&gt;appendChild($cnfXml-&gt;createElement('zf:const'))-&gt;setAttribute('zf:name', 'APPLICATION_PATH');
  $pathnode-&gt;nodeValue .= '.cache';
  </code></pre>