
-----------------------------------
Jiran
Fri Jun 22, 2007 10:17 am

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:

 
	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("")
	
	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!
