解决方案 »

  1.   

    这个和xml就没关系了,你需要用split首先按照分号切割,然后按照等号切割。
      

  2.   

    获取到这个connectionStrings的值,然后按自己分割。方法按照楼上的。。
      

  3.   

    使用linq  to xml 解析xml;http://blog.csdn.net/duanzi_peng/article/details/24018431
    然后分割字符串split(';') 成数组,取值。
      

  4.   

    Data Source=a;Initial Catalog=b;Persist Security info=True;User id=c;Password=d;
    不再是XML格式。不能用XMLDocument
      

  5.   


        DataSet ds = new DataSet();
                ds.ReadXml("test.xml");
                string s=ds.Tables[0].Rows[0][0].ToString();
                string[] str = s.Split(';');
       str[0]="Data Source=a";
       str[1]="Initial Catalog=b";
    ......