1

Possible Duplicate:
Is there a validating HTML parser implemented in Java?

Hi,

Is there is any API which parse the HTML text using java.

All the function should in the format of Objects

e.g. In the following text i want to Parse the HTML file and parser should return me the list of tags , attribute ..

<HTML>
<BODY>
    <INPUT TYPE="text" value="100">
</BODY>
</HTML>

Thanks

5
  • 1
    Please search before you ask. There are tons of questions just like this. Commented Feb 10, 2010 at 12:11
  • and tons of google results for "parse HTML java" Commented Feb 10, 2010 at 12:16
  • @Bozho: that alone is not a reason not to post on here. Commented Feb 10, 2010 at 12:22
  • 1
    it is for posting a question like "is there an API" - there is. It isn't a reason for not asking "which is a good parsing API" Commented Feb 10, 2010 at 12:33
  • @Bozho: When someone asks "is there an API" they always mean "which API should I use". Assuming anything else is just willfully ignoring the real question. It's not a good way to state that question, but it's also not useful to anyone to claim not to realize that something else was meant. Commented Feb 10, 2010 at 12:34

3 Answers 3

6

Comprehensive list here

Sign up to request clarification or add additional context in comments.

Comments

2

Refer to HTML/XML Parser for Java and Is there a validating HTML parser implemented in Java? and finally Which HTML Parser is the best?

These should answer your question nicely.

Comments

0

Regex's should work just fine.... cough

2 Comments

+1 for humor! Also see the top response at stackoverflow.com/questions/1732348/…
Haha, yeah - I remember reading that on the Coding Horror blog. Good stuff indeed :)

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.