class test
{
private static string root;
public static void showXML(string path)
{
XmlDocument xd = new XmlDocument();
xd.Load(path);
XmlNodeList xnl = xd.DocumentElement.ChildNodes;
root = xd.FirstChild.NextSibling.Name;//记录根节点
Console.Write(root+"");
foreach (XmlNode xn in xnl)
{
...[ 查看全文 ]