Automating the Web with WebL

By Hannes Marais and Tom Rodeheffer

Dr. Dobb's Journal January 1999

(a)
Elem(page,"h1") + Elem(page,"h2")
(b)
Pat(page,"(W|w)eb") before Elem(page,"h1")[3]
(c)
Elem(page,"a") directlyafter Pat(page,"\bCITE\b")
(d)
Elem(page,"a") contain Elem(page,"img")
(e)
var tbls = Elem(page,"table");       // all tables
var sqs = Pat(page,"Stock Quotes");  // all s.q. texts
var sqts = tbls directlycontain sqs; // innermost s.q. tables
var sqts1 = sqts after sqts[0];      // except the first
Elem(page,"tr") inside sqtsl         // rows of those tables

Example 2: Program fragments using algebraic piece-set operators.

Back to Article