解决方案 »

  1.   

    转化成公式?
    加入dataset控件, 名字修改为dsXML
     string c1 = null;
                string c2 = null;
                dsXML.ReadXml(System.Windows.Forms.Application.StartupPath + @"\\test1.xml");
                c1 = dsXML.Tables["CondItem"].Rows[0]["vLeft"].ToString();
                c2 = dsXML.Tables["CondItem"].Rows[0]["vRight"].ToString();           
      

  2.   

    补充: str = c1+"=="+c2;
          MessageBox.Show(str);
        str就是:hr_hi_edu.reducation =='04' 
      

  3.   

    包括写:string c1 = null;
                string c2 = null;
                string str;
                string s = "<?xml version=\"1.0\" encoding=\"gb2312\" ?>  <Condition>  <CondItem iItem=\"1\" vLeft=\"hr_hi_edu.reducation\" vMidOper=\"EQ\" vRight=\"'04'\" vBracketLeft=\"\" vBracketRight=\"\" vRelation=\"\"  />  </Condition>";            
                FileStream fs = new FileStream(System.Windows.Forms.Application.StartupPath + "\\test2.xml", FileMode.Create);
                StreamWriter sw = new StreamWriter(fs);          
                sw.Write(s);          
                sw.Flush();          
                sw.Close();
                fs.Close();
                dsXML.ReadXml(System.Windows.Forms.Application.StartupPath + @"\\test2.xml");
                c1 = dsXML.Tables["CondItem"].Rows[0]["vLeft"].ToString();
                c2 = dsXML.Tables["CondItem"].Rows[0]["vRight"].ToString();
                str = c1+"=="+c2;
                MessageBox.Show(str);