手机
当前位置:查字典教程网 >编程开发 >ASP教程 >ASP常用函数:ArrayToxml
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 常用函数用法

ASP常用函数:CStrIP()

[转]ASP常用函数:TimeZone

ASP常用函数:LastDay()

ASP常用函数:Trace()

ASP常用函数:CLngIP()

ASP 非法字符过滤函数

ASP常用函数:getIMG()

ASP常用函数:XMLEncode

精品推荐
分类导航