2013/7/16 Alex Vondrak <ajvond...@gmail.com>

> 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" } } }
>         }
>     }
> }
>
> Here instead of find-all, you can use
html.parser.analyzer.find-between-all which correctly handles nested html
elements.

IN: scratchpad "<html><div class=\"food\">nested stuff here</div></html>"
               parse-html [ "class" attribute " " split "food" swap member?
] find-between-all


--
mvh Björn Lindqvist
------------------------------------------------------------------------------
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

Reply via email to