[ruby-list:45606] [ANN] nokogiri 1.0.0 リリース

From: Aaron Patterson <aaron@...>
Date: 2008-10-31 01:38:36 UTC
List: ruby-list #45606
こんにちは!アーロンと申します。

nokogiri 1.0.0 をリリースしました。

* <http://nokogiri.rubyforge.org/>
* <http://github.com/tenderlove/nokogiri/wikis>
* <http://github.com/tenderlove/nokogiri/tree/master>

Nokogiri はHTMLやXMLやSAXやXSLTやReaderのパーサーです。

### FEATURES:

* XPath で探せる
* CSS3 のセレクターで探せる
* XML/HTMLのビルダーはある

NokogiriはHpricotより早くパーサーし、検索出来たり、
正確にCSS3とXPathをサポート出来たりする。

  * http://gist.github.com/18533

NokogiriはHpricotの代わりに使用出来る。
その互換性は簡単に正しいCSSとXPathを使用する事が出来る。

### 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

Changes:

### 1.0.0 / 2008-07-13

* 1 major enhancement

  * Birthday!

* <http://nokogiri.rubyforge.org/>
* <http://github.com/tenderlove/nokogiri/wikis>
* <http://github.com/tenderlove/nokogiri/tree/master>

-- 
Aaron Patterson
http://tenderlovemaking.com/

In This Thread

Prev Next