用户名:
密 码: 记住
您当前的位置:首页 > 网络编程 > Net教程

c#中带头(声明)的xml(封装)生成

时间:2015-01-29  来源:互联网  作者:佚名
复制代码 代码如下:
XmlDocument downLoadFilexml = new XmlDocument();
XmlElement root = null;
XmlElement kisokChild = null;
//生成xml的头
XmlNode xmlnode= downLoadFilexml.CreateXmlDeclaration("1.0", "utf-8", null);
downLoadFilexml.AppendChild(xmlnode);
root = downLoadFilexml.CreateElement("test");
root.SetAttribute("Guid",“1”);
root.SetAttribute("BuildID","0");
downLoadFilexml.AppendChild(root);
kisokChild = downLoadFilexml.CreateElement("testChild");
kisokChild.SetAttribute("Interval","111");
root.AppendChild(kisokChild);
Response.Write(downLoadFilexml.OuterXml);
Response.End();
来顶一下
返回首页
返回首页
推荐资讯
asp.net 简单验证码验证实现代码 asp.net 简单验证码验证实现代码首先是新建一个验证码页面 ValidateCode.aspx 定义变量 这样
通过ASP.net实现flash对数据库的访问 通过ASP.net实现flash对数据库的访环境:adobe flash CS4,VS2008 , Access2003 实现步骤: 1
相关文章
栏目更新
栏目热门