取某一个节点下的所有子节点

using System.Xml;
using System.Xml.Linq;


XmlDocument document = new XmlDocument();
document.Load("SessionDef.xml");

XmlNodeList nodelist = document.SelectSingleNode("SessionGroup").ChildNodes;

 foreach (XmlNode node in nodelist)
{
                string s1=node.Name;
 
}

 

代码操作的xml文件是  SessionDef.xml

posted on 2014-05-16 15:30  齐文宣  阅读(783)  评论(0编辑  收藏  举报

导航