[英]how to remove error log in Jtidy?
I use code below for jtidy. 我将下面的代码用于jtidy。
Tidy tidy = new Tidy();
tidy.setQuiet(true);
tidy.setShowWarnings(false);
doc = tidy.parseDOM(in, null);
it can remove all warning log but i still get error log below 它可以删除所有警告日志,但我仍然在下面得到错误日志
line 424 column 20 - Error: is not recognized!
line 481 column 20 - Error: is not recognized!
How can i remove error above? 如何清除以上错误? and it looks that i set "show-errors=0" in config file doesn't work either, any ideas?
而且看来我在配置文件中设置“ show-errors = 0”也不起作用,有什么想法吗? thanks!
谢谢!
jtidy.config: jtidy.config:
show-warnings=no
show-errors=6
You can use 您可以使用
public void setShowErrors(int showErrors)
function, which sets the number of errors to put out. 函数,它设置要排除的错误数。 And you should give 0 as a parameter.
并且您应该给0作为参数。
Ref: http://jtidy.sourceforge.net/apidocs/org/w3c/tidy/Tidy.html#setShowErrors(int) 参考: http : //jtidy.sourceforge.net/apidocs/org/w3c/tidy/Tidy.html#setShowErrors(int)
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.