title: Cannot write XML file with default namespace
body: <p>I'm writing a Python script to update Visual Studio project files. They look like this:</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;Project ToolsVersion="4.0" DefaultTargets="Build" 
        xmlns="http://schemas.microsoft.com/developer/msbuild/2003"&gt;
    &lt;PropertyGroup&gt;
        ...
  </code></pre>
  
  <p>The following code reads and then writes the file:</p>
  
  <pre><code>import xml.etree.ElementTree as ET
  
  tree = ET.parse(projectFile)
  root = tree.getroot()
  tree.write(projectFile,
             xml_declaration = True,
             encoding = 'utf-8',
             method = 'xml',
             default_namespace = "http://schemas.microsoft.com/developer/msbuild/2003")
  </code></pre>
  
  <p>Python throws an error at the last line, saying:</p>
  
  <pre><code>ValueError: cannot use non-qualified names with default_namespace option
  </code></pre>
  
  <p>This is surprising since I'm just reading and writing, with no editing in between.  Visual Studio refuses to load XML files without a default namespace, so omitting it is not optional.</p>
  
  <p>Why does this error occur? Suggestions or alternatives welcome.</p>