title: Issue in generating the xml file from python minidom
body: <p>Here is the code:</p>
  
  <pre><code>    from xml.dom.minidom import Document
  
  doc = Document()
  root = doc.createElement('root')
  doc.appendChild(root)
  for i in range(1,3):
      main = doc.createElement('item class:=memory')
      root.appendChild(main)
      for j in range(1,3):
          text = doc.createTextNode('DIMM Size'+str(j))
          main.appendChild(text)
  
  print (doc.toprettyxml(indent='\t'))
  </code></pre>
  
  <p>Here is the output:</p>
  
  <pre><code>     &lt;?xml version="1.0" ?&gt;
  &lt;root&gt;
      &lt;item class:=memory&gt;
          DIMM Size1
          DIMM Size2
      &lt;/item class:=memory&gt;
      &lt;item class:=memory&gt;
          DIMM Size1
          DIMM Size2
      &lt;/item class:=memory&gt;
  &lt;/root&gt;
  </code></pre>
  
  <p>I am trying to generate the file with following code. Is there a way to generate the following output:</p>
  
  
  
  
  <pre><code>&lt;root&gt;
      &lt;item class:=memory&gt;
          &lt;p&gt; DIMM Size1 &lt;/p&gt;
          &lt;p&gt;DIMM Size2 &lt;/p&gt;
      &lt;/item&gt;
      &lt;item class:=memory&gt;
          &lt;p&gt;DIMM Size1&lt;/p&gt;
          &lt;p&gt;DIMM Size2&lt;/p&gt;
      &lt;/item&gt;
  &lt;/root&gt;
  </code></pre>