1.xml转换成DataSet 

XML格式的字符串与DataSet之间的转换string   strXML   =   "<DataRow><Row   id=\"2\"   name=\"name2\"/><Row   id=\"1\"  name=\"name1\"/>/DataRow>"
XML格式的字符串与DataSet之间的转换    
XML格式的字符串与DataSet之间的转换  DataSet   ds   
=   new
   DataSet();   
XML格式的字符串与DataSet之间的转换  ds.ReadXml(
new   System.IO.StringReader(strXML));//就是这一句 呵呵


2.DataSet转换成XML

XML格式的字符串与DataSet之间的转换DataSet   ds   =   new   DataSet();   
XML格式的字符串与DataSet之间的转换
string strXML=ds.GetXml();

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2021-10-18
  • 2022-12-23
  • 2021-12-18
猜你喜欢
  • 2022-12-23
  • 2021-11-22
  • 2022-02-09
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案