<?xml version="1.0" encoding="UTF-8"?>
<swUpgrade xmlns="http://www.3gpp.org/ftp/specs/archive/32_series/32.645#utranNrm" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" schemaLocation="http://www.3gpp.org/ftp/specs/archive/32_series/32.645#utranNrm swUpgrade.xsd">
<contentBlock>
<compatibleALDs>
<compatibilityInformation>
<vendorCode>VR</vendorCode>
<aldType>aldType</aldType>
<productNumber>productNumber</productNumber>
<swVersion>swVersion</swVersion>
<hwVersion>hwVersion</hwVersion>
</compatibilityInformation>
</compatibleALDs>
<sw>VG9uZ1l1MTRSQ1UyLjEuMAAAAAAAAAAAAAAAAAAAAACYCwAgiSEACG03</sw>
</contentBlock>
</swUpgrade>
 private void CreateXML(string xmlFilePath)
{
string xmlnsAttr= "http://www.3gpp.org/ftp/specs/archive/32_series/32.645#utranNrm";
string xmlnsXsiAttr = "http://www.w3.org/2001/XMLSchema-instance";
string xsiSchemaLocAttr = "http://www.3gpp.org/ftp/specs/archive/32_series/32.645#utranNrm swUpgrade.xsd"; XmlDocument xmlDoc = new XmlDocument();
//加入XML的声明段落
xmlDoc.AppendChild(xmlDoc.CreateXmlDeclaration("1.0", "UTF-8", null)); // swUpgrade
XmlElement swUpgradeElement = xmlDoc.CreateElement("swUpgrade");
swUpgradeElement.SetAttribute("xmlns", xmlnsAttr);
swUpgradeElement.SetAttribute("xmlns:xsi", xmlnsXsiAttr);
swUpgradeElement.SetAttribute("xsi:schemaLocation", xsiSchemaLocAttr);
xmlDoc.AppendChild(swUpgradeElement); //contentBlock
XmlNode contentBlockNode = xmlDoc.CreateElement("contentBlock"); //compatibleALDs
XmlNode compatibeALDsNode = xmlDoc.CreateElement("compatibleALDs"); //compatibilityInformation
XmlNode informationNode = xmlDoc.CreateElement("compatibilityInformation");
XmlElement vendorCodeElement = xmlDoc.CreateElement("vendorCode");
vendorCodeElement.InnerText = "VR";
XmlElement aldTypeElement = xmlDoc.CreateElement("aldType");
aldTypeElement.InnerText = "aldType";
XmlElement productNumberElement = xmlDoc.CreateElement("productNumber");
productNumberElement.InnerText = "productNumber";
XmlElement swVersionElement = xmlDoc.CreateElement("swVersion");
swVersionElement.InnerText = "swVersion";
XmlElement hwVersionElement = xmlDoc.CreateElement("hwVersion");
hwVersionElement.InnerText = "hwVersion"; informationNode.AppendChild(vendorCodeElement);
informationNode.AppendChild(aldTypeElement);
informationNode.AppendChild(productNumberElement);
informationNode.AppendChild(swVersionElement);
informationNode.AppendChild(hwVersionElement);
compatibeALDsNode.AppendChild(informationNode); contentBlockNode.AppendChild(compatibeALDsNode); XmlNode swNode = xmlDoc.CreateElement("sw"); ;
swNode.InnerText = "VG9uZ1l1MTRSQ1UyLjEuMAAAAAAAAAAAAAAAAAAAAACYCwAgiSEACG03"; contentBlockNode.AppendChild(swNode);
swUpgradeElement.AppendChild(contentBlockNode);
xmlDoc.Save(@"d:\test.xml"); }

最新文章

  1. js生成二维码
  2. According to TLD or attribute directive in tag file, attribute end does not accept any expressions
  3. Build Instructions (Windows) – The Chromium Projects
  4. usermod
  5. tomcat7.0 处理问题
  6. wordpress主题结构_源码
  7. 转载RabbitMQ入门(5)--主题
  8. JSON API in Javascript
  9. bzoj2285
  10. C++语言体系设计哲学的一些随想(未完待续)
  11. hdu Examining the Rooms
  12. back_insert_iterator和iterator用起来不一样。
  13. [LeetCode]题解(python):122-Best Time to Buy and Sell Stock II
  14. Java&amp;&amp;As3.0 中的final 关键字
  15. ubuntu16.04下编译安装vim8.1
  16. 一个简单IP防刷工具类, x秒内最多允许y次单ip操作
  17. 史上最简单的SpringCloud教程 | 第九篇: 服务链路追踪(Spring Cloud Sleuth)
  18. JS特效实现微博评论逻辑
  19. 任意两点间的最短路问题(Floyd-Warshall算法)
  20. 继承:继承后子类构造函数具有隐式super,所以子类中所以的构造函数默认会访问父类中的空参数的构造函数

热门文章

  1. linux tcl expect 安装(转)
  2. jenkins 入门教程(中)
  3. 拿什么拯救你,我的代码--c#编码规范实战篇
  4. K-means聚类算法
  5. Matlab2015基本语句语法04
  6. jQuery之DOM属性
  7. react.js 生命周期componentDidUpdate的另类用法:防止页面过渡刷新
  8. Android基础总结(一)
  9. WCF服务器证书配置说明-没有能够进行密钥交换的私钥,或者进程可能没有访问私钥的权限
  10. poi导出的excel的数字小数位过多?