title: How to add a namespace to an attribute in lxml
body: <p>I'm trying to create an xml entry that looks like this using python and lxml:</p>
  
  <pre><code>&lt;resource href="Unit 4.html" adlcp:scormtype="sco"&gt;
  </code></pre>
  
  <p>I'm using python and lxml.  I'm having trouble with the <code>adlcp:scormtype</code> attribute.  I'm new to xml so please correct me if I'm wrong.  <code>adlcp</code> is a namespace and <code>scormtype</code> is an attribute that is defined in the adlcp namespace, right?<br>
  I'm not even sure if this is the right question but... My question is, how do I add an attribute to an element from a non-default namespace using lxml? I apologize in advance if this is a trivial question.</p>