title: Create multiple attribute for one Element with DOM
body: <p>How can I create more than one attribute for a DOM Element?</p>
  
  <p>Here I have one attribute</p>
  
  <pre><code>$data = $xml-&gt;createElement('enclosure', $rssdata["nNr"]);
  $enclosure = $xml-&gt;createAttribute('type');
  $enclosure-&gt;value = 'image/jpeg';
  $data-&gt;appendChild($enclosure);
  $item-&gt;appendChild($data);
  </code></pre>
  
  <p>But I need two attributes like the export here for URL</p>
  
  <pre><code>&lt;enclosure type="image/jpeg" url=""&gt;1&lt;/enclosure&gt;
  </code></pre>