Quantcast
Channel: XML, System.Xml, MSXML and XmlLite forum
Viewing all articles
Browse latest Browse all 935

Sorting xml nodes in c#

$
0
0

How to sort the below xml based on DOB

<recentData>
  <info>
    <Name>Vivek</Name>
    <DOB>20-07-2018</DOB>
    <Salary>6,458</Salary>
  </info>
  <info>
    <Name>Daniel</Name>
    <DOB>02-07-2018</DOB>
    <Salary>6,458</Salary>
  </info>
  <info>
    <Name>Mahat</Name>
    <DOB>15-07-2018</DOB>
    <Salary>6,458</Salary>
  </info>
 </recentData>

like this

 <recentData>
   <info>
    <Name>Daniel</Name>
    <DOB>02-07-2018</DOB>
    <Salary>6,458</Salary>
  </info>
    <info>
    <Name>Mahat</Name>
    <DOB>15-07-2018</DOB>
    <Salary>6,458</Salary>
  </info>
  <info>
    <Name>Vivek</Name>
    <DOB>20-07-2018</DOB>
    <Salary>6,458</Salary>
  </info>
 </recentData>


Viewing all articles
Browse latest Browse all 935

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>