I want to sort below xml, Based on the Adult and child ( i need to take Adult and child as constant):
Another possibility is to use an ADODB Disconnected Recordset, and use the ADODB tools for sorting and extracting.
A good place to start (code is in VB):
How To Obtain an ADO Recordset from XML
Dim oStream As ADODB.Stream
Set oStream = New ADODB.Stream
oStream.Open
oStream.WriteText sXML 'Give the XML string to the ADO Stream
oStream.Position = 0 'Set the stream position to the start
Dim oRecordset As ADODB.Recordset
Set oRecordset = New ADODB.Recordset
oRecordset.Open oStream 'Open a recordset from the stream
oStream.Close
Set oStream = Nothing
Set RecordsetFromXMLString = oRecordset 'Return the recordset
Set oRecordset = Nothing
Would this be helpful http://www.developer.com/xml/article.php/1560361 , It shows how to use XSL transformation to output XML sorted in the form of HTML, But I think you can modify XSL output to be XML (<xsl:output>)
If these records coming from SQL Server, It is much easier to output them sorted already.. Are you trying to do caching??
If you trying to do caching , check my post: http://www.moretechtips.net/2008/11/object-oriented-data-caching-for.html