Sort XML data in classic ASP

后端 未结 2 730
星月不相逢
星月不相逢 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
      
    0 讨论(0)
  • 2021-01-15 03:16

    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

    0 讨论(0)
提交回复
热议问题