ASP基本函数之ArrayToxml的使用
Public Function ArrayToxml(DataArray, Recordset, row, xmlroot)
Dim i, node, rs, j
If xmlroot = "" Then xmlroot = "xml"
Set ArrayToxml = Server.CreateObject("msxml2.FreeThreadedDOMDocument"& MsxmlVersion)
ArrayToxml.appendChild(ArrayToxml.createElement(xmlroot))
If row = "" Then row = "row"
For i = 0 To UBound(DataArray, 2)
Set Node = ArrayToxml.createNode(1, row, "")
j = 0
For Each rs in Recordset.Fields
node.Attributes.setNamedItem(ArrayToxml.createNode(2, LCase(rs.Name), "")).text = DataArray(j, i)& ""
j = j + 1
Next
ArrayToxml.documentElement.appendChild(Node)
Next
End Function
%>
ASP基本函数之ArrayToxml的使用文章小编就暂时分享到这里了,如果你还有需要咨询小编的,可以直接来网站留言。获取更多精彩有趣的技术文章内容,尽在爱站技术频道网站。