in reply to How to read onclick properties on row of a table using HTML::Table::Extractor
xsh is kinda hard to learn but this does it :)
$ xsh -q < table.xsh /body/table ,Date,Price,Comments dkfjskdjfskfd,21/9,2324,abc dkfjskdjfskfd1,21/9,2324,abasdasc dkfjskdjfskfdsdfsdf2,21/9,2324,absadsadsc $ cat table.xsh open "table.html"; for //table { echo; pwd; echo; for ./tr { my $first = @onclcick; $first ||=""; echo xsh:join(",", $first, ./td ); }; echo; }; echo;
Naturally it doesn't handle rowspan/colspan or tbodys
|
|---|