看看 xmldom 的 send 方法
要用 post 而不是 get

解决方案 »

  1.   

    有两处错误
    1,你不能用string xmlstr = doc.ToString();而用xmlreader
    2,其实是有数据返回了,只是你用alert(ResponseXML.xml)是读不出的。
    你用alert(ResponseText)
      

  2.   

    楼上的大哥
    用xmlreader方法能说清楚一点吗
      

  3.   

    xmlTextReader是读xml文件的,你可查看一下msdn。
    至于你的程序中可以这样
    System.IO.StreamReader a=new System.IO.StreamReader(Request.InputStream);
    string xmlstr =a.ReadToEnd();
      

  4.   

    http://expert.csdn.net/Expert/topic/2427/2427883.xml?temp=.5563166
      

  5.   

    <html><head>
    <script language="javascript">
    function sendXml()
    {
      var http = new ActiveXObject("Microsoft.XMLHTTP");
      http.open("POST", "TestXml.aspx", false);
      http.setRequestHeader("Content-Type","text/xml");
      http.send("<root>hello" + Math.random() + "</root>");
      if (http.status == 200)
    alert(http.responseText);
      else
            alert(http.statusText);
    }
    </script>
    </head><body>
    <input type="button" value="send" onclick="sendXml()">
    </body></html>
    <%@ Import Namespace="System.Xml" %>
    <script language="C#" runat="server">
    void Page_Load(Object o, EventArgs e)
    {
      if (Request.ContentType.ToLower() == "text/xml")
      {
        XmlDocument xmldoc = new XmlDocument();
        xmldoc.Load(Request.InputStream);
        Response.Write(xmldoc.InnerXml);
        Response.End();
      }
    }
    </script>