title: Python xml minidom. generate <text>Some text</text> element
body: <p>I have the following code.</p>
  
  <pre><code>from xml.dom.minidom import Document
  
  doc = Document()
  
  root = doc.createElement('root')
  doc.appendChild(root)
  main = doc.createElement('Text')
  root.appendChild(main)
  
  text = doc.createTextNode('Some text here')
  main.appendChild(text)
  
  print doc.toprettyxml(indent='\t')
  </code></pre>
  
  <p>The result is:</p>
  
  <pre><code>&lt;?xml version="1.0" ?&gt;
  &lt;root&gt;
      &lt;Text&gt;
          Some text here
      &lt;/Text&gt;
  &lt;/root&gt;
  </code></pre>
  
  <p>This is all fine and dandy, but what if I want the output to look like this?</p>
  
  <pre><code>&lt;?xml version="1.0" ?&gt;
  &lt;root&gt;
      &lt;Text&gt;Some text here&lt;/Text&gt;
  &lt;/root&gt;
  </code></pre>
  
  <p>Can this easily be done?</p>
  
  <p>Orjanp...</p>