From: "Scott H." Date: 2012-03-26T11:22:30+09:00 Subject: Undecided on how to approach a problem of storing html tables in a database Hi guys I was hoping to get some advice from you all on 3 things: 1. Storing arbitrary hashes in a mysql database 2. Parsing HTML tables into well-formed text and putting them into hashes or arrays 3. as above, but including stripping links and replacing embedded images with more useful text (for indexing purposes) I'm trying to solve a problem where we report loads of interesting disk stats, including health values in a series of webpages for our servers, so I'm aiming to collect the information like unique array number, disk position, serial number, firmware value, current health value and probably chuck it into a hash, then store that in a more reasonable form in a database, against a server serial number and date The database schema is relatively straightforward, and what I've managed so far appears a bit more sane in ruby than in python or perl. Even though we stash alt-text in the table for the images, there doesn't seem to be a way to access it in ruby cleanly, and the bars indicate rough health out of ten, so I'm inclined to just use a regex - but not sure of what's the best way to approach it. The monster checkmarks indicate pass/fail on overall health, so I'd kind of like to keep those I'm also tempted to carry on using key-value pairs so I don't have to worry as much about table structure over time, and I need to really store serial, data, object (in this case disk array), and the hash itself Cheers Scott Attachments: http://www.ruby-forum.com/attachment/7192/_Untitled__-_IBM_Lotus_Notes_2012-02-24_09-35-57.png -- Posted via http://www.ruby-forum.com/.