星空网 > 软件开发 > ASP.net

c# 操作 xml

c# 操作

在System.

(网上对这些类的记录真得很少啊 可能因为类比较多吧  msdn的介绍)

 

创建一个新的

c# 操作 xml
      new       //在
"", "");
//创建根节点
"root");
root.InnerText = "我是根节点";

@"D:\My Documents\Visual Studio 2010\Projects\WebApplication2\WebApplication2\test.");
c# 操作 xml


生成的

<??> 
<root>我是根节点</root>

 

另外一种创建创建

      new             "<?" +
"<root>我是根节点</root>"
);
@"D:\My Documents\Visual Studio 2010\Projects\WebApplication2\WebApplication2\test.");


读取


c# 操作 xml
<??>
<root id="root">
<list num="0">
<name type="string">minglecun</name>
<age type="number">55</age>
</list>
<list num="1">
<name type="string">huluwa</name>
<age type="number">1</age>
</list>
</root>
c# 操作 xml

 

c# 操作 xml
      new       @"D:\My Documents\Visual Studio 2010\Projects\WebApplication2\WebApplication2\test."); 
//读某个节点
"//root");
Console.WriteLine( Console.WriteLine("------------------------------------------------");
"//root//list");
Console.WriteLine( Console.WriteLine("------------------------------------------------");
//
"//root").ChildNodes;
foreach (in xn0)
{
Console.WriteLine("========"+node.Name);
}
c# 操作 xml









原标题:c# 操作 xml

关键词:C#

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

tiktok播放为0:https://www.goluckyvip.com/tag/83956.html
tiktok挂v:https://www.goluckyvip.com/tag/83957.html
采集tiktok:https://www.goluckyvip.com/tag/83958.html
tiktok登录显示没网:https://www.goluckyvip.com/tag/83959.html
延迟计划:https://www.goluckyvip.com/tag/8396.html
tiktok登录小店:https://www.goluckyvip.com/tag/83960.html
七月份适合去日本旅游吗 7月份去日本哪里好玩:https://www.vstour.cn/a/363192.html
凤岗汽车站到松山湖风景区 松岗汽车站到凤凰山怎么坐车:https://www.vstour.cn/a/363193.html
相关文章
我的浏览记录
海外公司注册 | 跨境电商服务平台 | 深圳旅行社 | 东南亚物流