Set oXML = Server.CreateObject("MSXML2.DomDocument.6.0")
oXML.async = False: oXML.resolveExternals = False
Set oRoot = oXML.createElement("root")
oXML.appendChild oRoot
Do While Not Rs.Eof
Set oNode = oXML.createElement("heydon")
Set oSubNode = oXML.createElement("test")
oSubNode.text = rs(0)
oNode.AppendChild(oSubNode)
Set oSubNode = oXML.createElement("test")
oSubNode.text = rs(1)
oNode.AppendChild(oSubNode)
oRoot.AppendChild(oNode)
oRS.MoveNext
Loop