title: convert html ordered list to xml
body: <p>I have an html ordered list with differnent types e.g</p>
  
  <pre><code>&lt;ol type=a&gt;
      &lt;li&gt;This is list item a&lt;/li&gt;
      &lt;li&gt;this is list item b&lt;/li&gt;
   &lt;/ol&gt; 
  
  &lt;ol type=i&gt;
      &lt;li&gt;This is list item 1&lt;/li&gt;
      &lt;li&gt;this is list item 2&lt;/li&gt;
   &lt;/ol&gt; 
  </code></pre>
  
  <p>I want to know if we can convert them into xml markup mentioned below.</p>
  
  <pre><code>&lt;xml&gt;
     &lt;orderlist&gt;
     &lt;li&gt;
         &lt;num&gt;a&lt;/num&gt;
         &lt;text&gt;This is list item a&lt;/text&gt;
      &lt;/li&gt;
      &lt;li&gt;
        &lt;num&gt;b&lt;/num&gt;
        &lt;text&gt;This is list item b&lt;/text&gt;
     &lt;/li&gt;
     &lt;/orderlist&gt;
    &lt;/xml&gt;
  
   &lt;xml&gt;
  &lt;orderlist&gt;
  &lt;li&gt;
     &lt;num&gt;i&lt;/num&gt;
      &lt;text&gt;This is list item 1&lt;/text&gt;
  &lt;/li&gt;
  &lt;li&gt;
     &lt;num&gt;ii&lt;/num&gt;
     &lt;text&gt;This is list item 2&lt;/text&gt;
  &lt;/li&gt;
  &lt;/orderlist&gt;
  &lt;/xml&gt;
  </code></pre>
  
  <p>I can put match template for LI and easily get the text but how to get the numbering based on type attribute... ie a,b,c .... i, ii, iii, iv and so on... Any help will be appreciated. </p>