On Mon, Jul 15, 2013 at 12:11 PM, Mark Green <m...@antelope.nildram.co.uk>wrote:
> I expect it could be written up as a quotation.
>
Maybe something like this?
```
IN: scratchpad "<html><body><div class=\"food is good\"><p>mmm, candy
bar</p></div></body></html>" parse-html
[ "class" attribute "foo" swap subseq? ] find-all .
{
{
2
T{ tag
{ name "div" }
{ attributes H{ { "class" "food is good" } } }
}
}
}
```
Or like this?
```
IN: scratchpad "<html><body><div class=\"food is good\"><p>mmm, candy
bar</p></div></body></html>" parse-html
[ "class" attribute " " split "food" swap member? ] find-all .
{
{
2
T{ tag
{ name "div" }
{ attributes H{ { "class" "food is good" } } }
}
}
}
```
Just some ideas; I'm sure this could/should all be factored out into the
proper helper words.
Regards,
--Alex Vondrak
------------------------------------------------------------------------------
See everything from the browser to the database with AppDynamics
Get end-to-end visibility with application monitoring from AppDynamics
Isolate bottlenecks and diagnose root cause in seconds.
Start your free trial of AppDynamics Pro today!
http://pubads.g.doubleclick.net/gampad/clk?id=48808831&iu=/4140/ostg.clktrk
_______________________________________________
Factor-talk mailing list
Factor-talk@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/factor-talk