http://www.w3school.com.cn/
<?<string
获取如上
<??><string ="http://tempuri.org/">200,2014/5/6 0:06:05</string>
using System;using System.Collections.Generic;using System.Linq;using System.Text;using System.Data.Entity.Validation;using System.Data.Entity;using System.Data.Objects;using System.Web;using System.namespace Test{ class Program { static void Main(string[] args) { = new "../../1.");// foreach (in node.ChildNodes) { Console.WriteLine(item.Inner//string v = item.Value;//节点的值 //string v1 = item.Attributes["//节点属性值,这个获取会报错的,节点数据不对,需要其他全一些的//string v2 = item["string"].Value;//元素值 //string v3 = item["string"].Attributes["//元素属性值 //Console.WriteLine(v); //Console.WriteLine(v1); //Console.WriteLine(v2); //Console.WriteLine(v3); } Console.ReadKey(); } }
获取
new = @"<?" };
初始化
new @"<?"); Console.WriteLine(
初始化
原标题:获取XML数据
关键词:xml