看一下SQL帮助,里面有关于XML的解决方法。

解决方案 »

  1.   

    能不能用DataSet读出来,要是这样就好办了
    要是不能用DataSet就在名称空间System.Xml里找方法,很简单的
      

  2.   


    读出来
    XmlDocument doc=new XmlDocument();
    doc.load(xmlFile);XmlNode node=doc.//找到name节点
    this.txtName.Text=node.Value;大概这个意思,具体可以参考帮助文档
      

  3.   

    XmlDocument docCfg = new XmlDocument();
    docCfg.Load(路径);
    //然后有下面的属性方法等等,可以试试看,具体查找一些资料,都比我说得详细
    docCfg.ChildNodes[];
    docCfg.SelectNodes();
    docCfg.SelectSingleNode();
      

  4.   

    可以这样使用
    XmlDocument xmlDoc=new XmlDocument();
    xmlDoc.Load(FileName);
    TextBoxName.Text=xmlDoc.SelectSingleNode(XPathName).InnerText;
    TextBoxSex.Text=xmlDoc.SelectSingleNode(XPathSex).InnerText;
      

  5.   

    http://www.csdn.net/develop/Read_Article.asp?Id=16458
      

  6.   

    第一种:
    上面回复人: jimh(jimmy)的。
    第二种:用数据集
    DataSet dsLoad;
    dsLoad = new DataSet();
    dsLoad.ReadXml(strXmlPath + strXmlName, XmlReadMode.ReadSchema);
    tbxName.text = dsLoad.tables[0].rows[0]["姓名"];
    tbxSex.text = dsLoad.tables[0].rows[0]["性别"];