how to remove the warnings in Jtidy in java

前端 未结 5 1506
北荒
北荒 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:12

    I think this is the nicest solution, based on the answer of Joost:

    Tidy tidy = new Tidy();
    tidy.setShowErrors(0);
    tidy.setShowWarnings(false);
    tidy.setQuiet(true);
    

    All three are necessary.

提交回复
热议问题