在客户端生成xml文件出错
生成xml文件后放到服务器的硬盘上,代码如下:
代码如下:
Set RS = Server.CreateObject("ADODB.RecordSet")
SQL="SELECT * FROM 表1
RS.Open SQL,conntxm,1,1
RS.MoveFirst
Dim xmldoc
Set xmldoc= server.CreateObject("Msxml2.DOMDocument")
Dim version
Set version = xmldoc.createProcessingInstruction("xml","version='1.0' encoding='GB2312'")
xmldoc.appendchild(version)
Dim root
Set root =xmldoc.CreateNode(1,"root","")
xmldoc.appendChild(root)
do while (Not RS.EOF)
Set childNode=xmldoc.CreateNode(1,"CLXX","")
For Each f in rs.Fields
Set childnextNode= xmldoc.CreateNode(1,f.name,"")
childnextNode.Text=f.Value
childNode.appendChild(childnextNode)
Next
RS.MoveNext
root.appendChild childNode
loop
xmldoc.save(Server.Mappath(""&request("MRN")&".xml"&""))
提示这样的错误:msxml3.dll 错误 '80070005' 拒绝访问。
" xmldoc.save(Server.Mappath(""&request("MRN")&".xml"&"")) " 提示这句话错误。
恳请帮忙!