Please support our Java advertiser: Lunarpages Java Web Hosting
Views: 2175 | Replies: 3
![]() |
•
•
Join Date: Mar 2005
Posts: 27
Reputation:
Rep Power: 4
Solved Threads: 0
Hello,
I'm new to HTML parsing and I need some help.I want to parse a HTML file , and I have the Java classes in place but I need an advise on how to code a piece of logic in my callback function.
I need to parse through the file until I encounter the second table in the file and then display the contents of that particular table.
I'll be grateful if I can get help on this.
Thanks in advance..
Also I am getting a java.net.UnknownHostException: error when I enter any URL in my code. How can I solve that ?
I'm new to HTML parsing and I need some help.I want to parse a HTML file , and I have the Java classes in place but I need an advise on how to code a piece of logic in my callback function.
I need to parse through the file until I encounter the second table in the file and then display the contents of that particular table.
I'll be grateful if I can get help on this.
Thanks in advance..
Also I am getting a java.net.UnknownHostException: error when I enter any URL in my code. How can I solve that ?
•
•
•
•
Originally Posted by crestaldin
Hello,
I'm new to HTML parsing and I need some help.I want to parse a HTML file , and I have the Java classes in place but I need an advise on how to code a piece of logic in my callback function.
I need to parse through the file until I encounter the second table in the file and then display the contents of that particular table.
I'll be grateful if I can get help on this.
Thanks in advance..
That's pretty simple. Set up a count. So it counts the number of times a
<table border="1">is found. Check out the string api for the 'find' function.Once it finds the second occurence push all the data into storage untill it gets to the
</table>. For example, I'd push each line into an arraylist.•
•
•
•
Also I am getting a java.net.UnknownHostException: error when I enter any URL in my code. How can I solve that ?
I guess you're trying to use the java.net package to access url's from your program. Read the documentation carefully. It's most likely to be a simple error. Are you putting a http:// before each web address? Post some code if you like.
Last edited by iamthwee : Aug 1st, 2006 at 5:54 am.
... the hat of 'is this a cat in a hat?'
![]() |
•
•
•
•
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)






Linear Mode