Forums - C# Corner

Forum guidelines
surendra ka

surendra ka

  • 1.4k
  • 1
  • 5.4k

Sorting Xml Elements in C#.Net

Mar 16 2013 4:10 AM
Hi i'm having an xml document below like this
<Table>
    <bankname>Canara</bankname>
    <accountid>1</accountid>
    <balance>56789</balance>
  </Table>
  <Table>
    <accountid>0</accountid>
    <bankname>Canara</bankname>
    <balance>56789</balance>
  </Table>
  <Table>
    <accountid>302</accountid>
    <bankname>Canara</bankname>
    <balance>56789</balance>
  </Table>
  <Table>
    <accountid>309</accountid>
    <bankname>Canara</bankname>
    <balance>56789</balance>
  </Table>
  <Table>
    <accountid>310</accountid>
    <bankname>Canara</bankname>
    <balance>56789</balance>
  </Table>
  <Table>
    <accountid>0</accountid>
    <bankname>Canara</bankname>
    <balance>56789</balance>
  </Table>
  <Table>
    <bankname>Canara</bankname>
    <accountid>1</accountid>
    <balance>56789</balance>
  </Table>
  <Table>
    <accountid>302</accountid>
    <bankname>Canara</bankname>
    <balance>56789</balance>
  </Table>
  <Table>
    <accountid>309</accountid>
    <bankname>Canara</bankname>
    <balance>56789</balance>
  </Table>
  <Table>
    <accountid>310</accountid>
    <bankname>Canara</bankname>
    <balance>56789</balance>
  </Table>

I want to order by the document by accountid, and save back

Answers (2)

File APIs for .NET – 25% off Aspose.Total
Aspose are the market leader of .NET APIs for file business formats – natively work with DOCX, XLSX, PPT, PDF, MSG, MPP, images formats and many more! Use coupon code HOL2016PSB