title: Converting file with XML tags & csv's into a proper XML
body: <p>I have a following text file </p>
  
  <pre><code>&lt;IPG&gt;298,"2013-06-25 16:00","Modication"
   &lt;IIP&gt;
   13925,2,"ippico",2,2,"SGT","S.G.TEATINO TR/PM",2,8,0,"BELLO","BUONO"
   &lt;CR&gt;
    13925,10,"SGT",2,"SGT  CORSA 2",2,9,9,5571141,0,1,"2013-06-25 16:00",10,13925010
     &lt;CV&gt;
      13925010,1,"HOLZ","A","A.STO","",1,20,1600,0,0,0,3,14,3,14,0,0
      13925011,2,"BREED AND","A","G.PACI","",1,20,550,0,0,0,3,14,3,14,0,0
     &lt;/CV&gt;
    &lt;/CR&gt;
   &lt;/IIP&gt;
    &lt;GE&gt;A,100,331,332,353,354,372,373
    &lt;/GE&gt;
  &lt;IPG&gt;
  </code></pre>
  
  <p>I want to convert above file into proper XML structure treating each comma-separated values ( as you can see csv's inside the tag)  as an XML node or attribute in its own right.</p>
  
  <p>For example,
  <code>&lt;IPG&gt;</code> tag should be </p>
  
  <pre><code>&lt;IPG id="298" date="2013-06-25 16:00" desc="Medication"&gt;
  </code></pre>
  
  <p>For <code>&lt;CV&gt;</code> tag each line under tags should be a individual node like </p>
  
  <pre><code>&lt;CV id="13925010" Status="1" ......../&gt;
  &lt;CV id="13925011" Status="2"........./&gt;
  </code></pre>
  
  <p>Any idea how can I achieve this using c# 4.0. </p>
  
  <p>Thanks in advance.</p>