title: adding <para> tag before the list
body: <p>I have an existing XML that is something like this:</p>
  
  <pre class="lang-xml prettyprint-override"><code>&lt;para&gt;
    &lt;ul type="unordered"&gt;
      &lt;li&gt;
        &lt;content&gt;
          &lt;para&gt;First thing on the list&lt;/para&gt;
        &lt;/content&gt;
      &lt;/li&gt;
      &lt;li&gt;
        &lt;content&gt;
          &lt;para&gt;Some introductory text for the inner list:&lt;/para&gt;
          &lt;ul type="unordered"&gt;
            &lt;li&gt;
              &lt;content&gt;
                &lt;para&gt;this is a sublist1&lt;/para&gt;
              &lt;/content&gt;
            &lt;/li&gt;
            &lt;li&gt;
              &lt;content&gt;
                &lt;para&gt;this is a sublist2&lt;/para&gt;
              &lt;/content&gt;
            &lt;/li&gt;
          &lt;/ul&gt;
        &lt;/content&gt;
      &lt;/li&gt;
    &lt;/ul&gt;
  &lt;/para&gt;  
  </code></pre>
  
  <p>But What I want them is the inner list element to be wrapped in a <code>&lt;para&gt;</code>. </p>
  
  <pre class="lang-xml prettyprint-override"><code>&lt;para&gt;
    &lt;ul type="unordered"&gt;
      &lt;li&gt;
        &lt;content&gt;
          &lt;para&gt;First thing on the list&lt;/para&gt;
        &lt;/content&gt;
      &lt;/li&gt;
      &lt;li&gt;
        &lt;content&gt;
          &lt;para&gt;
            Some introductory text for the inner list:
            &lt;ul type="unordered"&gt;
              &lt;li&gt;
                &lt;content&gt;
                  &lt;para&gt;this is a sublist1&lt;/para&gt;
                &lt;/content&gt;
              &lt;/li&gt;
              &lt;li&gt;
                &lt;content&gt;
                  &lt;para&gt;this is a sublist2&lt;/para&gt;
                &lt;/content&gt;
              &lt;/li&gt;
            &lt;/ul&gt;
          &lt;/para&gt;
        &lt;/content&gt;
      &lt;/li&gt;
    &lt;/ul&gt;
  &lt;/para&gt;
  </code></pre>
  
  <p>I have code that checks if there is a list within a list and adds a  element. </p>
  
  <p>I am not sure what I am doing wrong, as I get the <code>&lt;para&gt;</code> added to each sublist. And I add them to the parent (<code>if eachl.append(para) to element.append(para)</code>), I get the whole sublist moved to the parent:</p>
  
  <pre><code>if element.tag == "ul":
      element.tag = "list"
      element.set("type", "unordered")
      list_nlist = element.findall("li/ul")
      if len(list_nlist) != 0:
          for eachl in list_nlist:
              para = copy.deepcopy(eachl)
              para.tag = "para"
              eachl.clear()
              eachl.insert(0, para)
              eachl.append(para)
  </code></pre>