Anytime you're trying to parse HTML you want a gem called nokogiri. There's
a lot of good documentation out there for it online.
On Nov 8, 2012 6:14 PM, "Mario Trento" <lists / ruby-forum.com> wrote:

> Hi,
> What would be the most cool way to process/parse html and write it out
> in another format, kind of transpose mode.
> e.g INPUT:===============================
> <tr>
>   <td>type</td>
>   <td>id=M_btn_Mainl00</td>
>   <td>home</td>
> </tr>
> <tr>
>   <td>clickAndWait</td>
>   <td>id=M_ct200_MainContent</td>
>   <td></td>
> </tr>
>
> Wanted output:============================
> command:
> command: ({ 'type', target: 'id=M_btn_Mainl00', value: 'home' });
> command: ({ 'clickAndWait', target: 'id=M_ct200_MainContent' });  // no
> value
>
>
> this to compose some fancy automation libs. I see the way to basically
> read and capture lines by tugs <tr>, <td> etc.. but feel should be more
> better way.
>
> Tx
> Dai
>
> --
> Posted via http://www.ruby-forum.com/.
>
>