首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > .NET > .NET >

System.Xml.XmlException: http is an unexpected token

2014-01-28 
Server Error in / Application. ------------------------------------------------------------------

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)

这种错误是什么意思,我在本机上浏览一点问题没有,在服务器上就是不行,而且前几天服务器也没这错误,不知道是怎么回事,请各位赐教!!!

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

        

热点排行