Programming C, C++, Java, PHP, Ruby, Turing, VB
Computer Science Canada 
Programming C, C++, Java, PHP, Ruby, Turing, VB  

Username:   Password: 
 RegisterRegister   
 Sorting XML Nodes
Index -> Programming, Visual Basic and Other Basics -> Visual Basic Help
View previous topic Printable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
Jiran




PostPosted: Fri Jun 22, 2007 10:17 am   Post subject: Sorting XML Nodes

Hi there,

I have some VB code that works with XML code. Basically, it loads in each bit of XML as a child to a tree. However, when I display the list (in HTML, using XSL to parse it) it isn't sorted. Here is my code so far:

code:

        dim pXMLDoc
        set pXMLDoc = Server.CreateObject("Msxml2.DOMDocument.6.0")
        dim pXMLDoc2
        set pXMLDoc2 = Server.CreateObject("Msxml2.DOMDocument.6.0")
        pXMLDoc.loadXml(Application.Contents.Item("StuffList"))
        pXmlDoc2.loadXML("<Stuff/>")
       
        dim pResult
        dim pNodeList
        set pNodeList = pXmlDoc.selectNodes( "Stuffs" )
        for each pResult in pNodeList
                pXMLDoc2.documentElement.appendChild pResult
        next


I replaced some code with some variation of the word "Stuff". One thing to note is that in the line with "Stuffs", the nodes are different, so when they're loaded into pXMLDoc2 they are all unique.

So does anyone know how I can go about sorting the list in pXMLDoc2? Thanks!
Sponsor
Sponsor
Sponsor
sponsor
Display posts from previous:   
   Index -> Programming, Visual Basic and Other Basics -> Visual Basic Help
View previous topic Tell A FriendPrintable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic

Page 1 of 1  [ 1 Posts ]
Jump to:   


Style:  
Search: