2010-02-03から1日間の記事一覧

hpricot:An Hpricot Showcase:Hpricot Basics:Figuring Out Paths

>> require "hpricot" => true >> doc = Hpricot("<html><body><p>A simple <b>test</b> string.</p><p>foo</p></body></html>") => #<Hpricot::Doc {elem <html> {elem <body> {elem <p> "A simple " {elem <b> "test" </b>} " string." </p>} {elem <p> "foo" </p>} </body>} </html>}> >> doc.at("p/b") => {elem <b> "t…</b>