title: Add prefixed attribute in ElementTree
body: <p>I am manipulating SVG files in ElementTree. Given the file <code>test.svg</code></p>
  
  <pre><code>&lt;?xml version='1.0' encoding='utf-8'?&gt;
  &lt;svg 
    xmlns="http://www.w3.org/2000/svg"
    xmlns:xlink="http://www.w3.org/1999/xlink"&gt;
  &lt;/svg&gt;
  </code></pre>
  
  <p>I tried to create an element with specific prefix</p>
  
  <pre><code>import xml.etree.ElementTree as ET
  ET.register_namespace("", "http://www.w3.org/2000/svg")
  tree = ET.parse('test.svg')
  tree.getroot().set("xmlns:xlink", "http://www.w3.org/1999/xlink")
  link = ET.fromstring('&lt;a xlink:href="http://www.mysite.com/"&gt;&lt;/a&gt;')
  tree.write('worldMap/test_out.svg', encoding = 'utf-8', xml_declaration = True)
  </code></pre>
  
  <p>but run into a <code>unbound prefix</code> error. I've looked through <a href="http://effbot.org/zone/element-namespaces.htm" rel="nofollow">this tutorial</a> but can't quite see what's wrong.</p>