asp.net页面直接输出纯xml

       XmlDocument xml = new XmlDocument();
            xml.Load(Server.MapPath("aa.xml"));//读取你的XML
            Response.ClearContent();
            Response.ClearHeaders();
            Response.ContentType = "text/xml";
            xml.Save(Response.Output);
            Response.End();

 

posted @ 2012-05-22 13:46  bule  阅读(321)  评论(0编辑  收藏  举报