HTML / HTML中的HTML验证器? (不一定是XML)
我正在寻找类似 http://validator.nu/ 的内容,我将验证HTML输入(字符串),我想通知用户如果有任何缺少的结束标签,某个元素是否不能具有某种属性,那么性质(HTML 4.01基本上严格验证)。
I'm looking for something like http://validator.nu/, I'll be validating html input ( string ) and I want to notify the user if there are any missing end tags, whether a certain element can't have a certain attribute, things of that nature ( HTML 4.01 Strict validation basically ).
Sidenote:我不会处理XML / DTD,我不想更正用户输入,如 http://htmlpurifier.org/ 这样做。
Sidenote: I won't be dealing with XML/DTDs, and I don't want to correct the user input like how http://htmlpurifier.org/ does it.
使用官方 W3 Validator SOAP Web服务,因为它远远优于Tidy的警告,只是我需要的完美工具。必须学习一些SOAP和命名空间规则,但值得一试:)
Soo, I ended up using the official W3 Validator SOAP web service because it's far superior to Tidy's warnings and it's just the perfect tool that I needed. Did have to learn some SOAP and namespace rules, but it was worth it :)