What I want to do is to make a widget that displays train and bus departures of selected stations. The public transport timetables are not copy-righted and the data is used by many applications and other (normal) widgets but while the WDK does not support SQL, the only way to fetch the data is parsing the output of CGI calls to be usually displayed with a browser. Parsing should not be very difficult in this case. If I would use PHP, I would know what to do...
Your best option will be to write a web service then in PHP (or whatever) that will parse the timetables, and then your widget can make a request to the PHP service. Have the service return the data in JSON. This way you are limiting any extra parsing and processor time required to parse on the TV.
Also, what happens if the output of the cgi changes sometime down the road? Then you are going to have to change your widget, and put it through QA which can take months. In the meantime, users are left with a widget that is not working properly.