你的位置:首页 > 软件开发 > ASP.net > 生成XML文件。

生成XML文件。

发布时间:2016-10-12 15:00:06
之前的项目需要涉及到对第一种方法: 1 //动态的一个节点一个节点的生成 2 public void Createstring aaa) 3 { 4 new 5 "plist", "", "", "&quot ...

之前的项目需要涉及到对

第一种方法:

生成XML文件。生成XML文件。
 1 //动态的一个节点一个节点的生成 2 public void Createget='_blank'>string aaa) 3 { 4 new  5 "plist", "", "", ""); 6 //创建类型声明节点  7 "1.0", "utf-8", ""); 8  9 new 10 // node.Inner//Apple//DTD PLIST 1.0//EN' 'http://www.apple.com/DTDs/PropertyList-1.0.dtd' >";11 //创建根节点 12 "plist");13 14 15 "dict",null);16 CreateNode("key", "items");17 18 root.AppendChild(dict);19 "array");20 21 "dict");22 CreateNode("key", "assets");23 24 "array");25 26 "dict");27 CreateNode("key", "kind");28 CreateNode("string", "software-package");29 CreateNode("key", "url");30 //文件下载地址31 CreateNode("string", "https://app.yuntian.net/ipa/DealerPortal_1.0.ipa");32 array1.AppendChild(dict2);33 "dict");34 CreateNode("key", "kind");35 CreateNode("string", "full-size-image");36 CreateNode("key", "needs-shine");37 "true");38 dict3.AppendChild(true1);39 CreateNode("key", "url");40 //http或者https链接的图片地址,可直接使用app对应的icon(分辨率没强制要求)41 CreateNode("string", "https://app.yuntian.net/images/ios1.png");42 array1.AppendChild(dict3);43 "dict");44 CreateNode("key", "kind");45 CreateNode("string", "display-image");46 CreateNode("key", "needs-shine");47 "true");48 dict4.AppendChild(true2);49 CreateNode("key", "url");50 //http或者https链接的图片地址,可直接使用app对应的icon(分辨率没强制要求)51 CreateNode("string", "https://app.yuntian.net/images/xlogo.png");52 array1.AppendChild(dict4);53 54 55 dict1.AppendChild(array1);56 57 CreateNode("key", "metadata");58 "dict");59 CreateNode("key", "bundle-identifier");60 CreateNode("string", aaa);61 CreateNode("string", "0.0.1");62 CreateNode("key", "kind");63 CreateNode("string", "software");64 CreateNode("key", "title");65 CreateNode("string", "经销商门户");66 67 dict1.AppendChild(dict5);68 array.AppendChild(dict1);69 dict.AppendChild(array);70 71 72 try73 {74 "F:/");75 }76 catch (Exception e)77 {78 //显示错误信息 79 Console.WriteLine(e.Message);80 }81 //Console.ReadLine();82 83 }84 public void CreateNode(string name, string value)85 {86 null);87 node.InnerText = value;88 parentNode.AppendChild(node);89 }

 

海外公司注册、海外银行开户、跨境平台代入驻、VAT、EPR等知识和在线办理:https://www.xlkjsw.com

原标题:生成XML文件。

关键词:xml

xml
*特别声明:以上内容来自于网络收集,著作权属原作者所有,如有侵权,请联系我们: admin#shaoqun.com (#换成@)。