Win a copy of Java by Comparison (eBook) this week in the Java in General forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Problem in extracting tables from a web page  RSS feed

 
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi everyone.....
My code goes as below

My probelem is it extracts all the tables and displays it....
and prints the max width and max height value at the end....
Can anybody please help me to display only the table with max height and max width. it should not display any other tables.........
plaese help me correct this code

[ UD: Please UseCodeTags when posting code fo any length. ]
[ April 25, 2008: Message edited by: Ulf Dittmer ]
 
Rancher
Posts: 42975
76
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
One thing that jumps out is that you're using compareTo for comparing strings that are essentially integers. That won't work, because "20" > "100", as far as String.compareTo is concerned. You can convert strings to integers using Integer.parseInt.
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!