Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 5985255
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T22:30:13+00:00 2026-05-22T22:30:13+00:00

I am using Jtidy parser in java. URL url = new URL(www.yahoo.com); HttpURLConnection conn

  • 0

I am using Jtidy parser in java.

URL url = new URL("www.yahoo.com"); 
HttpURLConnection conn = (HttpURLConnection) url.openConnection();
InputStream in = conn.getInputStream(); 
doc = new Tidy().parseDOM(in, null);

when I run this, “doc = new Tidy().parseDOM(in, null);”
I am getting some warnings as follows:

Tidy (vers 4th August 2000) Parsing "InputStream"
line 140 column 5 - Warning: <table> lacks "summary" attribute

InputStream: Doctype given is "-//W3C//DTD XHTML 1.0 Strict//EN"
InputStream: Document content looks like HTML 4.01 Transitional

1 warnings/errors were found!

These warnings are getting displayed automatically on console. But I don’t want these
warnings to be displayed on my console after running

doc = new Tidy().parseDOM(in, null);

Please help me,how to do this,how to remove these warnings from console.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-22T22:30:14+00:00Added an answer on May 22, 2026 at 10:30 pm

    Looking at the Documentation I found a few methods which may do what you want.

    There is setShowErrors, setQuiet and setErrout. You may want to try the following:

    Tidy tidy = new Tidy();
    tidy.setShowErrors(0);
    tidy.setQuiet(true);
    tidy.setErrout(null);
    doc = tidy.parseDOM(in, null);
    

    One of them may be enough already, these were all the options I found. Note that this will simply hide the messages, not do anything about them. There is also setForceOutput to get the output, even if errors were generated.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

can anybody give sample program for converting xhtml doc to xml using jtidy in
Using the http://www.ifans.com/forums/showthread.php?t=132024 post from another question i am allowing the user to enter
Currently, I am trying to clean up an HTML file using JTidy, convert it
We are using JTidy to clean up some html for sax processing. We've had
I am working on a Java project using spring2 and Maven. I have already
I'm using JTidy in order to parse web page data. My question is the
using file_get_contents , I open an Internet URL and get the contents of this
Using Google Maps InfoBox - http://google-maps-utility-library-v3.googlecode.com/svn/trunk/infobox/docs/reference.html Currently the map will scroll - pan control
I am currently using JTidy to parse an HTML document and fetch a collection
Using Java, assuming v1.6. I have a collection where the unique index is a

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.