ASP常用函数:ArrayToxml
摘要:
<%
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
node.Attributes.setNamedItem(ArrayToxml.createNode(2,LCase(rs.Name),"")).text=DataArray(j,i)&""
j=j+1
Next
ArrayToxml.documentElement.appendChild(Node)
Next
EndFunction
%>
【ASP常用函数:ArrayToxml】相关文章:
★ ASP常用的函数
上一篇:
ASP常用函数:IIF()
下一篇:
ASP常用函数:ReplaceHTML