title: How to replace a value of an attribute in xml using Python minidom
body: <p>I have the following xml:</p>
  
  <pre><code>&lt;country name="Liechtenstein"&gt;
      &lt;rank&gt;1&lt;/rank&gt;
      &lt;year&gt;2008&lt;/year&gt;
      &lt;gdppc&gt;141100&lt;/gdppc&gt;
      &lt;neighbor direction="E" name="Austria"/&gt;
      &lt;neighbor direction="W" name="Switzerland"/&gt;
  &lt;/country&gt;
  </code></pre>
  
  <p>I want to replace the value "Liechtenstein" with "Germany", so the result should look like:</p>
  
  <pre><code>&lt;country name="Germany"&gt;
      &lt;rank&gt;1&lt;/rank&gt;
      &lt;year&gt;2008&lt;/year&gt;
      &lt;gdppc&gt;141100&lt;/gdppc&gt;
      &lt;neighbor direction="E" name="Austria"/&gt;
      &lt;neighbor direction="W" name="Switzerland"/&gt;
  &lt;/country&gt;
  </code></pre>
  
  <p>So far I am up to this point:</p>
  
  <pre><code>from xml.dom import minidom
  xmldoc = minidom.parse('C:/Users/Torah/Desktop/country.xml')
  print xmldoc.toxml()
  country = xmldoc.getElementsByTagName("country")
  firstchild = country[0]
  print firstchild.attributes["name"].value
  #simple string mathod to replace
  print firstchild.attributes["name"].value.replace("Liechtenstein", "Germany")
  print xmldoc.toxml()
  </code></pre>