[racket] webscraperhelper, sxml, xpath, etc ...

From: Sanjeev K Sharma (throwit1 at gmail.com)
Date: Thu May 30 17:05:51 EDT 2013

any way to apply webscraperhelper, with goals including element attributes - "id" or "class" or "width" for span, div , etc ...? 

for example the "four" here: (webscraperhelper'(td"four")doc)

apply to this line (the four is in the last <td>)
        <tr class="this_class" id="this_id"><td>a3</td><td>b4</td><td>four</td></tr>


instead of the "four", how could I get "this_class"  or "this_id" from that first <tr> ?

an xpath that works for that, straight from the sxml document page
((sxpath"//tr/@class/text()")doc) 
 => '("this_class")

Posted on the users mailing list.