天天看点

webmethod返回xml转换为dataset

(xml转换DataSet)

代码片

.

StringReader stream = null;
            XmlTextReader reader = null;
 
                DataSet xmlDS = new DataSet();
                stream = new StringReader(xmlData);
                //从stream装载到XmlTextReader
                reader = new XmlTextReader(stream);
                xmlDS.ReadXml(reader);
                return xmlDS;