赞同楼上
XmlDocument xml = new XmlDocument();
xml.Load("人物.xml");
XmlNode xn = xml.DocumentElement;
TreeNode teed = null;
foreach (XmlNode x in xn.ChildNodes[0].ChildNodes)//
{
if (x.Name == "Name")
{
teed = new TreeNode();
teed.Text = x.InnerText;
treeView1.Nodes.Add(teed);
}
else
{
TreeNode tree1 = new TreeNode();
tree1.Text = x.InnerText;
teed.Nodes.Add(tree1);
}
}