日期:2014-05-17 浏览次数:20479 次
XmlWriter writer = null; try { //创建一个XMLSerializer对象 XmlSerializer serializer = new XmlSerializer(fbs.GetType()); //将XMLWriter对象赋值为XMLTextWriter对象 writer = new XmlTextWriter([color=#FF0000]Response[/color].OutputStream, System.Text.Encoding.UTF8); //调用序列化方法 serializer.Serialize(writer, fbs); } finally { if (writer != null) { writer.Close(); } }