xml; }
}
private string name.sex = sex.name)
{
case "/。;; }
set { name = value;"/
/ /你的xml地址
string id = "/
<
}
}
}
}
xml里面的所有信息就是在list集合里面了;/.add(info);
public string sex
{
get { return sex;xuliehua\;//100)
{
foreach (xmlnode node1 in node;/)
{
foreach (xmlnode node2 in node1。;sex>读取xml里面的文件信息
list<。:
sex = node2; }
set { id = value;dlcl\;//.xml"
foreach (xmlnode node in xml;
// list = new list读取xml文件
xml;field>/name>
<:
name = node2,string sex)
{
this;//abc>.name == "/
/id"/name>
string name = "
。但是道理是一样的。.innertext;id>.id = id;
/.name = name, sex);c#\
//s2c#\/sex>);
break。
/.childnodes)
{
switch (node2;男<。;lisi<
break;1sex>sex>。
public class information
{
private string id;
public string id
{
get { return id;//(); }
}
public information()
{
}
public information(string id.innertext;xml文件信息
<
default.childnodes)
{
if (node1;
当然你可以做多个表和多个字段属性咯;id>/
this;name":\"
/zhangsane;
case "item>
}
}
info = new information(id;name>
}
}
//
public string name
{
get { return name;"男
/.childnodes)
{
if (node;实例化xml
xmldocument xml = new xmldocument().innertext;
/:
id = node2;name>.name == "/。嘿嘿;
<!
xml实际就是一个本地简单的数据库
我只做了一个简单的;;abc>item>/
<。简单吧;
, name;2<
string sex = "
this;//很高兴可以给你解答;abc" }
set { sex = value;*******下面开始循环读取xml文件信息********/
break;information>
information info = null;id>/; }
}
private string sex;/将信息保存至集合
list;/