title: Python generate XML with Schema-Location
body: <p>How I can create a such XML:</p>
  
  <pre><code>&lt;urlset xsi:schemaLocation="http://www.sitemaps.org/schemas/sitemap/0.9 http://www.sitemaps.org/schemas/sitemap/0.9/sitemap.xsd"&gt;
      &lt;url&gt;
          &lt;loc&gt;http://...&lt;/loc&gt;
      &lt;/url&gt;
  &lt;/urlset&gt;
  </code></pre>
  
  <p>How can I add a xsi:schemaLocation with xml.etree? Here's my code:</p>
  
  <pre><code>urlset = ET.Element("urlset")
  for url in self.urls:
      url = ET.SubElement(urlset, "url")
      ET.SubElement(url, "loc").text = url.loc
  self.tree = ET.ElementTree(urlset)
  self.tree.write(path)
  </code></pre>
  
  <p>Is there a simple way to add a such attribute?</p>