title: How to re-arrange repeated xml nodes using xslt
body: <p>Please suggest the xslt code for the below problem. I have provided a simple code from the input XML and expected XML. Help will be appreciated if someone can provide XSLT code to tranform input xml in the expected xml.</p>
  
  <p>INPUT XML</p>
  
  <pre><code>    &lt;INFOPERSONFILLNOTE&gt;
      &lt;VARIABLELABEL&gt;Level&lt;/VARIABLELABEL&gt;
      &lt;SERIALNO1 STATUS="NONE"&gt;
      1
      &lt;VARIABLELABEL&gt;S1&lt;/VARIABLELABEL&gt;
      &lt;CHANGEDATE/&gt;
      &lt;CHANGEREASON/&gt;
      &lt;/SERIALNO1&gt;
      &lt;SERIALNO1 STATUS="NONE"&gt;
      2
      &lt;VARIABLELABEL&gt;S2&lt;/VARIABLELABEL&gt;
      &lt;CHANGEDATE/&gt;
      &lt;CHANGEREASON/&gt;
      &lt;/SERIALNO1&gt;
      &lt;CLASSPERSONFILLNOTE STATUS="NONE"&gt;
      c1
      &lt;VARIABLELABEL&gt;C1&lt;/VARIABLELABEL&gt;
      &lt;CHANGEDATE&gt;20200226&lt;/CHANGEDATE&gt;
      &lt;CHANGEREASON&gt;cr&lt;/CHANGEREASON&gt;
      &lt;/CLASSPERSONFILLNOTE&gt;
      &lt;CLASSPERSONFILLNOTE STATUS="NONE"&gt;
      c2
      &lt;VARIABLELABEL&gt;C2&lt;/VARIABLELABEL&gt;
      &lt;CHANGEDATE&gt;20200226&lt;/CHANGEDATE&gt;
      &lt;CHANGEREASON&gt;cr&lt;/CHANGEREASON&gt;
      &lt;/CLASSPERSONFILLNOTE&gt;
     &lt;/&lt;INFOPERSONFILLNOTE&gt;
  </code></pre>
  
  <p>EXPECTED XML:</p>
  
  <pre><code>    &lt;INFOPERSONFILLNOTE&gt;
      &lt;VARIABLELABEL&gt;Level&lt;/VARIABLELABEL&gt;
      &lt;SERIALNO1 STATUS="NONE"&gt;
      1
      &lt;VARIABLELABEL&gt;S1&lt;/VARIABLELABEL&gt;
      &lt;CHANGEDATE/&gt;
      &lt;CHANGEREASON/&gt;
      &lt;/SERIALNO1&gt;
      &lt;CLASSPERSONFILLNOTE STATUS="NONE"&gt;
      c1
      &lt;VARIABLELABEL&gt;C1&lt;/VARIABLELABEL&gt;
      &lt;CHANGEDATE&gt;20200226&lt;/CHANGEDATE&gt;
      &lt;CHANGEREASON&gt;cr&lt;/CHANGEREASON&gt;
      &lt;/CLASSPERSONFILLNOTE&gt;
      &lt;SERIALNO1 STATUS="NONE"&gt;
      2
      &lt;VARIABLELABEL&gt;S2&lt;/VARIABLELABEL&gt;
      &lt;CHANGEDATE/&gt;
      &lt;CHANGEREASON/&gt;
      &lt;/SERIALNO1&gt;
      &lt;CLASSPERSONFILLNOTE STATUS="NONE"&gt;
      c2
      &lt;VARIABLELABEL&gt;C2&lt;/VARIABLELABEL&gt;
      &lt;CHANGEDATE&gt;20200226&lt;/CHANGEDATE&gt;
      &lt;CHANGEREASON&gt;cr&lt;/CHANGEREASON&gt;
      &lt;/CLASSPERSONFILLNOTE&gt;
     &lt;/&lt;INFOPERSONFILLNOTE&gt;
  </code></pre>
  
  <p>Kindly Help.</p>
  
  <p>Thanks in anticipation.</p>