ASP常用函数:ArrayToxml

2018-09-06 12:42

阅读:434

  <%
PublicFunctionArrayToxml(DataArray,Recordset,row,xmlroot)
Dimi,node,rs,j
Ifxmlroot=Thenxmlroot=xml
SetArrayToxml=Server.CreateObject(msxml2.FreeThreadedDOMDocument&MsxmlVersion)
ArrayToxml.appendChild(ArrayToxml.createElement(xmlroot))
Ifrow=Thenrow=row
Fori=0ToUBound(DataArray,2)
SetNode=ArrayToxml.createNode(1,row,)
j=0
ForEachrsinRecordset.Fields
j=j+1
Next
ArrayToxml.documentElement.appendChild(Node)
Next
EndFunction
%>


评论


亲,登录后才可以留言!