About
Pricing
Community
Teams
Start Free Trial
Log in
satmisha
asked on
1/2/2013
Sort XML Elements
Having following XML, Want to sort this based on the values in XML elements:
<Address>
<HomeNumber />
<HouseAddress />
</Address>
<Address>
<HomeNumber />
<HouseAddress />
</Address>
<Address>
<HomeNumber />
<HouseAddress />
</Address>
<Address>
<HomeNumber />
<HouseAddress />
</Address>
<Address>
<HomeNumber>00</HomeNumber
>
<HouseAddress>PPP Nagar</HouseAddress>
</Address>
<Address>
<HomeNumber>01</HomeNumber
>
<HouseAddress>Street 145</HouseAddress>
</Address>
<Address>
<HomeNumber>02</HomeNumber
>
<HouseAddress>Street 798</HouseAddress>
</Address>
Expected Output:
<Address>
<HomeNumber>00</HomeNumber
>
<HouseAddress>PPP Nagar</HouseAddress>
</Address>
<Address>
<HomeNumber>01</HomeNumber
>
<HouseAddress>Street 145</HouseAddress>
</Address>
<Address>
<HomeNumber>02</HomeNumber
>
<HouseAddress>Street 798</HouseAddress>
</Address>
<Address>
<HomeNumber />
<HouseAddress />
</Address>
<Address>
<HomeNumber />
<HouseAddress />
</Address>
<Address>
<HomeNumber />
<HouseAddress />
</Address>
<Address>
<HomeNumber />
<HouseAddress />
</Address>
Please suggets. Hopefully looking forward good replies..
XML
Visual Basic.NET
6
1
Last Comment
Gertone (Geert Bormans)
8/22/2022 - Mon
Pratima
1/2/2013
see this example will help you
http://stackoverflow.com/questions/716525/how-to-sort-an-xml-file-using-net
Pratima
1/2/2013
see this also
http://www.wictorwilen.se/Post/How-to-sort-XML-without-XSL-in-the-NET-Framework.aspx
satmisha
1/2/2013
ASKER
Thanks for your quick reply,
Would it be possible for you to please provide code for the same... as I am quite newbi.. though I am also trying...
This is the best money I have ever spent. I cannot not tell you how many times these folks have saved my bacon. I learn so much from the contributors.
rwheeler23
ASKER CERTIFIED SOLUTION
Gertone (Geert Bormans)
1/2/2013
THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
GET A PERSONALIZED SOLUTION
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.
satmisha
2/19/2013
ASKER
Thanks
Gertone (Geert Bormans)
2/19/2013
welcome
http://stackoverflow.com/questions/716525/how-to-sort-an-xml-file-using-net