Asp Forum
Home
|
Login
|
Register
|
Search
Forums
>
comp.lang.ruby
[ANN] nokogiri 1.2.2 Released
Aaron Patterson
3/15/2009 12:44:00 AM
nokogiri version 1.2.2 has been released!
* <
http://nokogiri.rubyforg...
* <
http://github.com/tenderlove/nokogiri...
* <
http://github.com/tenderlove/nokogiri/tree/...
* <
http://rubyforge.org/mailman/listinfo/nokogir...
* <
http://nokogiri.lighthouseapp.com/projects/19607-nokogiri/ov...
Nokogiri (é?¸) is an HTML, XML, SAX, and Reader parser.
Changes:
### 1.2.2 / 2009-03-14
* New features
* Nokogiri may be used with soap4r. See XSD::XMLParser::Nokogiri
* Nokogiri::XML::Node#inner_html= to set the inner html for a node
* Nokogiri builder interface improvements
* Nokogiri::XML::Node#swap swaps html for current node (LH #50)
* Bugfixes
* Fixed a tag nesting problem in the Builder API (LH #41)
* Nokogiri::HTML.fragment will properly handle text only nodes (LH #43)
* Nokogiri::XML::Node#before will prepend text nodes (LH #44)
* Nokogiri::XML::Node#after will append text nodes
* Nokogiri::XML::Node#search automatically registers root namepsaces (LH #42)
* Nokogiri::XML::NodeSet#search automatically registers namespaces
* Nokogiri::HTML::NamedCharacters delegates to libxml2
* Nokogiri::XML::Node#[] can take a symbol (LH #48)
* vasprintf for windows updated. Thanks Geoffroy Couprie!
* Nokogiri::XML::Node#[]= should not encode entities (LH #55)
* Namespaces should be copied to reparented nodes (LH #56)
* Nokogiri uses encoding set on the string for default in Ruby 1.9
* Document#dup should create a new document of the same type (LH #59)
* Document should not have a parent method (LH #64)
## SUPPORT:
The Nokogiri mailing list is available here:
*
http://rubyforge.org/mailman/listinfo/nok...
The bug tracker is available here:
*
http://nokogiri.lighthouseapp.com/projects/19607-nokogir...
## 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
* <
http://nokogiri.rubyforg...
* <
http://github.com/tenderlove/nokogiri...
* <
http://github.com/tenderlove/nokogiri/tree/...
* <
http://rubyforge.org/mailman/listinfo/nokogir...
* <
http://nokogiri.lighthouseapp.com/projects/19607-nokogiri/ov...
--
Aaron Patterson
http://tenderlovem...
Servizio di avviso nuovi messaggi
Ricevi direttamente nella tua mail i nuovi messaggi per
[ANN] nokogiri 1.2.2 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