Stream inputstream = Page.Request.InputStream;
            byte[] b = new byte[inputstream.Length];
            inputstream.Read(b, 0, (int)inputstream.Length);
            string inputstr = System.Text.Encoding.Default.GetString(b);下面呢 ....

解决方案 »

  1.   

    XmlDocument d  = new XmlDocument();
    d.Load(Request.InputStream);
      

  2.   

      <?xml version="1.0" encoding="GB2312" ?>
        <SBMP_REPORT_MESSAGE>
            <CONNECT_ID>100</CONNECT_ID>
            <BUSINESS_CODE>0100B23456</BUSINESS_CODE>
            <MESSAGE_ID>1234554321</MESSAGE_ID>
            <MSISDN>13600000001</MSISDN>
            <SUBMIT_TIME>0406010101</SUBMIT_TIME>
            <DONE_TIME>0406030101</DONE_TIME>
            <STATUS>DELIVRD</STATUS>
        </SBMP_REPORT_MESSAGE>
      

  3.   

    XmlDocument d = new XmlDocument();
    d.Load(inputstr );去解析吧,网上有很多相关示例代码
      

  4.   

    就是接收post传来的xml 我这边 d.Load()应该怎么写呢
      

  5.   

    d.Load(Request.InputStream);这个报错啊 System.Xml.XmlException: 缺少根元素
    哪里出了问题了
      

  6.   

    顶楼的代码,断点到
    string inputstr = System.Text.Encoding.Default.GetString(b);
    这行,执行过去,看看 inputstr 的内容是不是标准 xml,有没缺什么