From: Domain Admin Date: 2008-12-30T14:12:18+09:00 Subject: [ruby-list:45757] [ANN] nokogiri 1.1.0 リリース ------=_Part_11428_29298795.1230613968520 Content-Type: text/plain; charset=ISO-2022-JP Content-Transfer-Encoding: 7bit Content-Disposition: inline こんにちは!アーロンです。ひげの山男を呼んで下さい。 以下は、私の初めての短歌です:2008シアトルの雪嵐に捧げる 山男 雪の中でも プログラミング ひげの山男作 nokogiri version 1.1.0 をリリースしました! * * * * * Nokogiri はHTMLやXMLやSAXやXSLTやReaderのパーサーです。 Changes: ### 1.1.0 * 新しい機能 * カスタム XPath 機能はある。( Nokogiri::XML::Node#xpath 参照 ) * カスタム CSS 擬似クラスと機能はある。( Nokogiri::XML::Node#css 参照 ) * Nokogiri::XML::Node#<< が作成中に子ノードを自動追加 * バグの修正 * mutex が CSS のキャッシュのアクセスをロックする * GCC 3.3.5 のビルドに関する問題を修正 * XML::Node#to_xml が引数indentationを取る * XML::Node#dup が引数任意のdepthを取る * XML::Node#add_previous_sibling が新しい兄弟ノードで返す ## SYNOPSIS: require 'nokogiri' require 'open-uri' doc = Nokogiri::HTML(open('http://www.google.com/search?q=tenderlove')) #### # Search for nodes by css doc.css('h3.r a.l').each do |link| puts link.content end #### # Search for nodes by xpath doc.xpath('//h3/a[@class="l"]').each do |link| puts link.content end #### # Or mix and match. doc.search('h3.r a.l', '//h3/a[@class="l"]').each do |link| puts link.content end * * * * * -- Aaron Patterson http://tenderlovemaking.com/ ------=_Part_11428_29298795.1230613968520--