tags:

views:

296

answers:

2

Besides using XSLT...

How to Sort In-Memory XML with Microsoft XMLDOM?

+1  A: 

I'm not familiar with any method other than using XSLT to sort XML.

Why is XSLT not an option? It's simple and should not a performance buster. You can cache the FreeThreadedDOMDocument object once it has loaded the XSLT document to avoid parsing and compiling the XSLT document each time.

Doug D
+1  A: 

AFAIK, there is no way to sort in-memory XML without using XSLT to by moving the data to a new (sorted) list. You could copy the nodes to a sorted list, then put the nodes back in the new order. The exact technique depends a bit on your development software.

Workshop Alex