zhaohongw2015 / kaixin001-helper

Automatically exported from code.google.com/p/kaixin001-helper
0 stars 0 forks source link

HttpHelper中GetHtml函数的问题 #41

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
通过GetHtml获得开心网返回的html数据的时候,有时候会返回范
围在xml许可字符以外的无效
字符,最好在通过GetHtml获得文本,并将文本传递到XmlDocument��
�析以前做一次过滤,通过
添加以下代码就可以避免在xml解析的时候出现无效字符的问��
�:

xml = Regex.Replace(html, @"[\x00-\x08\x0B\x0C\x0E-\x1F]", string.Empty);

此问题是在加载我朋友花园信息的时候发现的,由于返回的xm
l包含无效字符造成无法分析花园的
数据。

Original issue reported on code.google.com by clhaz...@gmail.com on 24 Mar 2009 at 11:23

GoogleCodeExporter commented 8 years ago
感谢你的建议,农夫0325已在食堂初始化时对这种情况做了处�
��

Original comment by Mr.Ja...@gmail.com on 25 Mar 2009 at 4:23