您的位置:首页 > 其它

Xml.Linq 创建及保存XML文档

2010-03-11 14:52 295 查看
代码

XElement xdoc = XElement.Parse(@"
<customers>
<customer ID=""A"" City=""New York"" Region=""North America"">
<order Item=""Widget"" Price=""100"" />
<order Item=""Tire"" Price=""200"" />
</customer>
<customer ID=""B"" City=""Mumbai"" Region=""Asia"">
<order Item=""Oven"" Price=""501"" />
</customer>
</customers>
");

Console.WriteLine("Contents of xdoc:");
Console.WriteLine(xdoc);
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: