请问在后台我如何读取xml文件的所有内容?
请问我在后台如何读取以下xml文件(1.xml)里的所有内容,并response.write?
=======================================================================
<?xml version= "1.0 " standalone= "yes "?>
<?xml-stylesheet type= "text/xsl " href= "message.xsl "?>
<NewDataSet>
<tables>
<id> 12645 </id>
<usercode> ert </usercode>
<sex> 帅哥 </sex>
<content> <![CDATA[ert]]> </content>
<ttime> 2005-1-9 12:49:42 </ttime>
<title> ert </title>
<face> img/1.jpg </face>
<head> image/male.gif </head>
<ip> 192.168.1.3 </ip>
</tables>
<tables>
<id> 12646 </id>
<usercode> 我爱你 </usercode>
<sex> 帅哥 </sex>
<content> <![CDATA[fgh]]> </content>
<ttime> 2005-1-9 12:49:49 </ttime>
<title> fgh </title>
<face> img/1.jpg </face>
<head> image/male.gif </head>
<ip> 192.168.1.3 </ip>
</tables>
</NewDataSet>
------解决方案--------------------XmlDocument d = new XmlDocument();
d.Load(Server.MapPath( "~/x.xml "));
Response.Write(d.OuterXml);
------解决方案--------------------XmlDocument d = new XmlDocument();
d.Load(Server.MapPath( "~/x.xml "));
Response.Write(Server.HtmlEncode(d.OuterXml));
------解决方案--------------------XmlDocument d = new XmlDocument();
d.Load(Server.MapPath( "~/x.xml "));
Response.Write(Server.HtmlEncode(d.OuterXml));
楼上的正确.