I have an XmlNodeList that contains packets (item) from the root of the XML example below. I want to sort the XmlNodeList based on the node's key attribute value. The sorting has to be very efficient, every millisecond counts.
Do you have any idea?
<root>
<item key="1000000020">
Content 20
</item>
<item key="1000000001">
Content 1
</item>
...
<item key="1043245231">
Content n
</item>
</root>
Edit: I already have an XmlNodeList constructed from the items. I do not have access to the XmlDocument anymore, only the list of items.