I have a table in html that I would like to parse. Something like the one in the following
http://sprunge.us/IJUC
However, I’m not sure of a good way to parse out the information. I’ve seen a couple of html parsers, but those seem to require that everything has a special tag for you to parse it like info to grab; however, the majority of my info is within <td></td>
Does anyone have a suggestion for parsing this information out?
Shameless plug: My goquery library. It’s the jQuery syntax brought to Go (requires Go’s experimental html package, see instructions in the README of the library).
So you can do things like that (assuming your HTML document is loaded in doc, a
*goquery.Document):Edit: Change
doc.Root.Findtodoc.Findin the example since a goquery Document is now a Selection too (new in v0.2/master branch)