how to remove the warnings in Jtidy in java

前端 未结 5 1524
北荒
北荒 2021-01-13 20:18

I am using Jtidy parser in java.

URL url = new URL(\"www.yahoo.com\"); 
HttpURLConnection conn = (HttpURLConnection) url.openConnection();
InputStream in = c         


        
5条回答
  •  北荒
    北荒 (楼主)
    2021-01-13 21:00

    If you want to redirect the JTidy warnings to (say) a log4j logger, read this blog entry.

    If you simply want them to go away (along with other console output), then use System.setOut() and/or System.setErr() to send the output to a file ... or a black hole.

    For JTidy release 8 (or later), the Tidy.setMessageListener(TidyMessageListener) method deals with the messages more gracefully.


    Alternatively, you could send a bug report to webmaster@yahoo.com. :-)

提交回复
热议问题