你说的问题,我也没找到更好的办法,下面的代码能实现想要的效果,速度也还不错,不过是只读的,修改之后还得再写代码存回去.如果你只是想加载阅读的话,到是可用.Try
{
XmlTextReader reader=new XmlTextReader(@"FileName.xml");reader.ReadToFollowing("星期");string class_num=String.Empty, A=String.Empty,B=String.Empty,C=String.Empty,D=String.Empty;while (!(readUser.ReadState == ReadState.EndOfFile))
{
    if (readUser.GetAttribute ("Week")=="一")
    {
        reader.ToFollowing("课节");
        class_num = readUser.GetAttribute ("Class");     //如果不需要此列可以不加
         while (!(readUser.ReadState == ReadState.EndOfFile))
        {
             reader.ToFollowing("班级A");
             while (!(readUser.ReadState == ReadState.EndOfFile))
             {
                 A = read.ReadElementString("班级A");
             }
             reader.ToFollowing("班级B");
             while (!(readUser.ReadState == ReadState.EndOfFile))
             {
                 B = read.ReadElementString("班级B");
             }
             reader.ToFollowing("班级C");
             while (!(readUser.ReadState == ReadState.EndOfFile))
             {
                 C = read.ReadElementString("班级C");
             }
             reader.ToFollowing("班级D");
             while (!(readUser.ReadState == ReadState.EndOfFile))
             {
                 D = read.ReadElementString("班级D");
             }             yourTable.Rows.Add(class_num,A,B,C,D);
             class_num=A=B=C=D=String.Empty;    
        }
    }
}
}
Catch{}
如果这样做的话,就没必要通过DataSet中转了,直接DataGridView.Rows.Add()就行了.你的XML文件层次比较少,如果嵌套的层很多,而且文件较大时,我会用只读的办法.
哪位朋友有省事的办法帮忙顶一下.