2010-01-31から1日間の記事一覧

hpricot:An Hpricot Showcase:Hpricot Basics:Looping

>> require "hpricot" => true >> doc = Hpricot("<p>A simple <b>test</b> string.</p><p>foo</p>") => #<Hpricot::Doc {elem <p> "A simple " {elem <b> "test" </b>} " string." </p>} {elem <p> "foo" </p>}> >> doc/"p".each {|x| p x} "p" => #<Hpricot::Elements[{elem <p> "A simple " {elem <b> "test" </b>} " st…</hpricot::elements[{elem>