Asp Forum
Home
|
Login
|
Register
|
Search
Forums
>
comp.lang.ruby
[ANN] nokogiri 1.3.1 Released
Aaron Patterson
6/7/2009 11:03:00 PM
nokogiri version 1.3.1 has been released!
* <
http://nokogiri.rubyforg...
* <
http://github.com/tenderlove/nokogiri...
* <
http://github.com/tenderlove/nokogiri/tree/...
* <
http://rubyforge.org/mailman/listinfo/nokogir...
* <
http://github.com/tenderlove/nokogiri/...
Nokogiri (é?¸) is an HTML, XML, SAX, and Reader parser. Among Nokogiri's
many features is the ability to search documents via XPath or CSS3 selectors.
XML is like violence - if it doesnâ??t solve your problems, you are not using
enough of it.
## SUPPORT:
The Nokogiri mailing list is available here:
*
http://rubyforge.org/mailman/listinfo/nok...
The bug tracker is available here:
*
http://github.com/tenderlove/nokog...
The IRC channel is #nokogiri on freenode.
## SYNOPSIS:
require 'nokogiri'
require 'open-uri'
# Get a Nokogiri::HTML:Document for the page weâ??re interested in...
doc = Nokogiri::HTML(open('
http://www.google.com/search?q=tende...
))
# Do funky things with it using Nokogiri::XML::Node methods...
####
# 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
## REQUIREMENTS:
* ruby 1.8 or 1.9
* libxml2
* libxml2-dev
* libxslt
* libxslt-dev
## INSTALL:
* sudo gem install nokogiri
Changes:
### 1.3.1 / 2009-06-07
* Bugfixes
* extconf.rb checks for optional RelaxNG and Schema functions
* Namespace nodes are added to the Document node cache
* <
http://nokogiri.rubyforg...
* <
http://github.com/tenderlove/nokogiri...
* <
http://github.com/tenderlove/nokogiri/tree/...
* <
http://rubyforge.org/mailman/listinfo/nokogir...
* <
http://github.com/tenderlove/nokogiri/...
--
Aaron Patterson
http://tenderlovem...
Servizio di avviso nuovi messaggi
Ricevi direttamente nella tua mail i nuovi messaggi per
[ANN] nokogiri 1.3.1 Released
Inserendo la tua e-mail nella casella sotto, riceverai un avviso tramite posta elettronica ogni volta che il motore di ricerca troverà un nuovo messaggio per te
Il servizio è completamente GRATUITO!
x
Login to ForumsZone
Login with Google
Login with E-Mail & Password