Server Error in '/' Application.
--------------------------------------------------------------------------------'http' is an unexpected token. The expected token is '"' or '''. Line 2, position 13. 
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. Exception Details: System.Xml.XmlException: 'http' is an unexpected token. The expected token is '"' or '''. Line 2, position 13.Source Error: 
Line 641:        XmlDocument dom = new XmlDocument();
Line 642:        string str = "";
Line 643:        dom.LoadXml(xml);
Line 644:        XmlNode child = dom.SelectSingleNode("/root/" + node);
Line 645:        if (child != null)
 
这种错误是什么意思,我在本机上浏览一点问题没有,在服务器上就是不行,而且前几天服务器也没这错误,不知道是怎么回事,请各位赐教!!!

解决方案 »

  1.   

    可能是编码的问题导到xml标记不正常,检查一下文件编码.
      

  2.   

    xml = "<?xml version=\"1.0\" encoding=\"gb2312\"?><root><appid>other</appid>";
            xml += "<action>login</action>";
            xml += "<syskey>" + conn.md5(user.Text.Trim() + "xie", 16) + "</syskey>";
            xml += "<username>" + user.Text.Trim() + "</username>";
            xml += "<password>" + password.Text.Trim() + "</password>";
            xml += "<savecookie>1</savecookie>";
            xml += "</root>";
    这是参数,哪有问题吗?
      

  3.   

    你把xml打出来看看?有没有'http'
      

  4.   

    不懂了,我对XML了解基本为零,怎么打出来啊()
      

  5.   

    Response.Write(xml );
    Response.End();
      

  6.   

    <?xml version=\"1.0\" encoding=\"gb2312\"?>\r\n<root><appid>Dvbbs</appid><status>0</status><body><message><![CDATA[<li>登陆成功。]]></message></body></root> 是这个样子,没有'http'啊