Sort XML data in classic ASP

后端 未结 2 751
星月不相逢
星月不相逢 2021-01-15 02:43

I want to sort below xml, Based on the Adult and child ( i need to take Adult and child as constant):


  
    
         


        
2条回答
  •  花落未央
    2021-01-15 03:10

    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
      

提交回复
热议问题