你要把XML文档输出到客户端?HttpContext.Current.Response.Write(doc.InnerXml);HttpContext.Current.Response.End();//加上end