Automating the Web with WebL
By Hannes Marais and Tom Rodeheffer
Dr. Dobb's Journal January 1999
<b>(a)</b> Elem(page,"h1") + Elem(page,"h2") <b>(b)</b> Pat(page,"(W|w)eb") before Elem(page,"h1")[3] <b>(c)</b> Elem(page,"a") directlyafter Pat(page,"\bCITE\b") <b>(d)</b> Elem(page,"a") contain Elem(page,"img") <b>(e)</b> 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.
Copyright © 1999, Dr. Dobb's Journal