View Single Post
  #2 (permalink)  
Old September 9th, 2007, 07:14 PM
planoie's Avatar
planoie planoie is offline
Friend of Wrox
Points: 16,481, Level: 55
Points: 16,481, Level: 55 Points: 16,481, Level: 55 Points: 16,481, Level: 55
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Aug 2003
Location: Clifton Park, New York, USA.
Posts: 5,407
Thanks: 0
Thanked 16 Times in 16 Posts
Default

If the HTML is XHTML compliant you could treat it as XML and get the rows and values from the table using an xml document and the right set of xpath queries. This would be a fairly elegant way to do it and would probably require the least amount of code. If you can't expect the input to conform to XHTML then you'll have to write a parser to handle more poorly formed input.

-Peter