找到格式不正确的HTML的工具? [英] Tool to find malformed HTML?
问题描述
我正在寻找一个可以帮助我修复格式不正确的HTML的工具。例如:
< div id =foo>
< div id =bar>
< span>测试< / span>
< / div>
该工具会检测到丢失,并通知我第2行的id为'bar'的div是不关闭。我知道w3c验证器(在Web Developer Toolbar中使用它)。但我发现验证工具使用起来很慢。此外,一旦标签没有关闭,页面的其他部分就会产生很多错误。
这个工具既可以是独立应用程序,也可以是浏览器插件。
我使用Eclipse,JSP,JSTL和jQuery来生成HTML。即使Eclipse给我提供了有关格式错误的HTML的一些指示,但我主要生成了代码。因此,如果该工具分析生成的页面,这将是最好的。
解决方案HTMLTidy 将解决您的错误
xmllint 会发现你的错误
I'm looking for a tool that could help me fix malformed HTML. For example:
<div id="foo">
<div id="bar">
<span>Test</span>
</div>
The tool would detect a missing and inform me the the div with id 'bar' on line 2 is not closed. I know about the w3c validator (using it with the Web Developer Toolbar). But I find the validator tool slow to use. Additionally, once a tag is not closed, the rest of the page generates lots of errors.
This tool can either be a standalone application or a browser plugin.
I'm using Eclipse, JSP, JSTL and jQuery to generate HTML. Even if Eclipse give me some indication on malformed HTML, I have mostly generated code. Therefore, it would be best if the tool analyze the resulting page.
HTMLTidy will fix your errors
xmllint will find your errors
这篇关于找到格式不正确的HTML的工具?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!