使用Html Agility Pack忽略分析错误? [英] Ignoring parse errors with Html Agility Pack?

查看:125
本文介绍了使用Html Agility Pack忽略分析错误?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图从YouTube解析出单个页面......这不是真的没有语法错误。 Html Agility Pack尖叫这些错误,并且不会返回任何结果。

I'm trying to parse out a single page from YouTube... Which isn't really free of syntax errors. Html Agility Pack screams about these errors, and returns nothing in result.

http://codepaste.net/gh3hco

推荐答案

我没有试过这个,但基于< a href =http://htmlagilitypack.codeplex.com/discussions/258248 =nofollow>在他们论坛上的建议你可以使用HTML Tidy或 Tidy.NET 先清理HTML。或者,您可以找到错误的标签,并在预处理步骤中将其删除。

I haven't tried this, but based on a suggestion in their forum you can use HTML Tidy or Tidy.NET to clean the HTML first. Optionally, you could find the erroneous tags and remove them in a pre-process step.

这篇关于使用Html Agility Pack忽略分析错误?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆