I have xml of the following format:
<?xml version="1.0" encoding="utf-8"?>
<contactGrp name="People">
<contactGrp name="Developers">
<customer name="Mike" ></customer>
<customer name="Brad" ></customer>
<customer name="Smith" ></customer>
</contactGrp>
<contactGrp name="QA">
<customer name="John" ></customer>
<customer name="abi" ></customer>
</contactGrp>
</contactGrp>
I would like to sort the list of customers based on their names and return the document in the following format:
<?xml version="1.0" encoding="utf-8"?>
<contactGrp name="People">
<contactGrp name="Developers">
<customer name="Brad" ></customer>
<customer name="Mike" ></customer>
<customer name="Smith" ></customer>
</contactGrp>
<contactGrp name="QA">
<customer name="abi" ></customer>
<customer name="John" ></customer>
</contactGrp>
</contactGrp>
I am using C # and currently xmldocument.
Thank you
source
share