2010-04-13から1日間の記事一覧

hpricot:Hpricot::Traverse#/, #search

>> require "hpricot" => true >> doc = Hpricot('<p>foo1</p><p>foo2</p><div>foo3</div>') => #<Hpricot::Doc {elem <p> "foo1" </p>} {elem <p> "foo2" </p>} {elem <div> "foo3" </div>}> >> doc / "p" => #<Hpricot::Elements[{elem <p> "foo1" </p>}, {elem <p> "foo2" </p>}]> >> doc / "div" => #