[TxMt] Little bit OT: regexp and javascript

Ned Baldessin androse at gmail.com
Wed Mar 22 11:27:08 UTC 2006


Can't Dashboard widgets access the DOM of loaded web pages ?
If so, document.getElementById('idag').innerHTML is probably easier/faster.

    - n.

2006/3/22, Geir-Tore Lindsve <lindsve at bluezone.no>:
>
> Hi,
>
> This is a bit off-topic for this list, I know, but since I know there
> are a lot of highly competent people on this I'll give it a try...
>
> I'm currently trying to figure out how to use regexp + javascript to
> parse the content of a web page. What I want to do is collect weather
> data from a Norwegian website and include it in a dashboard widget.
>
> Here is the site with an example search:
>
>         http://tux.aftenposten.no/weathersearch/weathersearch.do?
> name=levanger&sok=limnor
>
> I tried to copy the source into TextMate and use the regexp search in
> TM to figure out the patterns to use, but I can't seem to solve it.
> Any help are appreciated.
>
> As far as I can see, the weather data for a particular day are
> enclosed by <tr><td class="idag" ... </tr>, but there is a lot of
> space around the tags, which I presume must be included in the regexp
> patterns.
>
> Anyone here which could kick me in the right direction when it comes
> to these patterns?
> --
> Mvh/Regards
> Geir-Tore Lindsve
> lindsve at bluezone.no
> http://www.lindsve.net
>
>
>
>
>
> ______________________________________________________________________
> For new threads USE THIS: textmate at lists.macromates.com
> (threading gets destroyed and the universe will collapse if you don't)
> http://lists.macromates.com/mailman/listinfo/textmate
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macromates.com/textmate/attachments/20060322/ce528685/attachment.html>


More information about the textmate mailing list