asfman
android developer
posts - 90,  comments - 213,  trackbacks - 0
<%@ Language="Javascript" %>
<%
var xmlDoc=new ActiveXObject("Microsoft.XMLDOM");
var root=xmlDoc.createElement("information");
xmlDoc.appendChild(root);
var iFrag=xmlDoc.createDocumentFragment();
for(var i=1;i<=Request.Form.Count;i++)
{
 if(Request.Form.Key(i)!="sub")
 {
  for(var j=1;j<=Request.Form(i).Count;j++)
  {
   var field=xmlDoc.createElement("field");
   var attID=xmlDoc.createAttribute("ID");
   attID.text=Request.Form.Key(i);
   field.setAttributeNode(attID);
   var value=xmlDoc.createElement("value");
   value.text=Request.Form(i)(j);
   field.appendChild(value);
   iFrag.appendChild(field);
  }
 }
}
root.appendChild(iFrag);
var p=xmlDoc.createProcessingInstruction("xml","version='1.0' encoding='gb2312'");
xmlDoc.insertBefore(p,root);
xmlDoc.save(Server.Mappath("information.xml"));
Response.Write("saved information.xml successfully!");
%>
posted on 2007-10-06 15:55 汪杰 阅读(288) 评论(0)  编辑 收藏 引用 所属分类: xml
只有注册用户登录后才能发表评论。

<2006年8月>
303112345
6789101112
13141516171819
20212223242526
272829303112
3456789

常用链接

留言簿(15)

随笔分类(1)

随笔档案(90)

文章分类(727)

文章档案(712)

相册

收藏夹

http://blog.csdn.net/prodigynonsense

友情链接

最新随笔

搜索

  •  

积分与排名

  • 积分 - 457546
  • 排名 - 6

最新随笔

最新评论

阅读排行榜

评论排行榜