Updating the tag of an xml file to none using minidom python
<p>I have an xml file and i am processing the xml file using xml.dom.minidom.i want to update the 'Command' tag value of the xml file to None(ie no value).My xml file is as shown below</p>

<pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
&lt;Project DefaultTargets="Build" ToolsVersion="4.0"  xmlns="http://schemas.microsoft.com/developer/msbuild/2003"&gt;
&lt;ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"&gt;
 &lt;PostBuildEvent&gt;
   &lt;Command&gt;sign "Loc" &lt;/Command&gt;
 &lt;/PostBuildEvent&gt;
&lt;/ItemDefinitionGroup&gt;
&lt;ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"&gt;
 &lt;PostBuildEvent&gt;
  &lt;Command&gt;COPY "SourceLoc" "DestLoc"&lt;/Command&gt;
  &lt;/PostBuildEvent&gt;
&lt;/ItemDefinitionGroup&gt;
&lt;ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"&gt;
 &lt;PostBuildEvent&gt;
   &lt;Command&gt;COPY "SourceLoc" "DestLoc"&lt;/Command&gt;
  &lt;/PostBuildEvent&gt;
&lt;/ItemDefinitionGroup&gt;
&lt;/Project&gt;
</code></pre>

<p>The resulting xml file should be as given below.Note that only the Command tag having the Copy text is updating.I don't want to use elementtree because it will not show the xml header in the output file.The reason is that iam using python2.6</p>

<pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
 &lt;Project DefaultTargets="Build" ToolsVersion="4.0"  xmlns="http://schemas.microsoft.com/developer/msbuild/2003"&gt;
  &lt;ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"&gt;
   &lt;PostBuildEvent&gt;
    &lt;Command&gt;sign "Loc" &lt;/Command&gt;
   &lt;/PostBuildEvent&gt;
  &lt;/ItemDefinitionGroup&gt;
  &lt;ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"&gt;
   &lt;PostBuildEvent&gt;
    &lt;Command&gt;&lt;/Command&gt;
   &lt;/PostBuildEvent&gt;
  &lt;/ItemDefinitionGroup&gt;
  &lt;ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"&gt;
  &lt;PostBuildEvent&gt;
    &lt;Command&gt;&lt;/Command&gt;
  &lt;/PostBuildEvent&gt;
   &lt;/ItemDefinitionGroup&gt;
 &lt;/Project&gt;
</code></pre>
