# Nokogiri 1.4.1 Released

**URL:** <https://www.ruby-forum.com/t/nokogiri-1-4-1-released/180088>\
**Category:** Ruby\
**Created:** [December 11, 2009, 6:32am UTC](https://www.ruby-forum.com/t/nokogiri-1-4-1-released/180088 "2009-12-11T06:32:59Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![aaronpowell](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/7bcc69/32.png) [@aaronpowell](https://www.ruby-forum.com/u/aaronpowell)\
**Post date:** [December 11, 2009, 6:32am UTC](https://www.ruby-forum.com/t/nokogiri-1-4-1-released/180088/1 "2009-12-11T06:32:59Z")

</div>

Hey everyone! Have you finished your holiday shopping yet? I know I  
haven’t.  
Fortunately for you guys, Mike and I like programming a lot more than  
shopping. I mean, don’t get me wrong. I _love_ shopping for myself, I  
just find shopping for other people to be, well, difficult.

Anyway, let’s get down to business:

nokogiri version 1.4.1 has been released!

- [http://nokogiri.org](http://nokogiri.org)
- [http://github.com/tenderlove/nokogiri/wikis](http://github.com/tenderlove/nokogiri/wikis)
- [http://github.com/tenderlove/nokogiri/tree/master](http://github.com/tenderlove/nokogiri/tree/master)
- [http://groups.google.com/group/nokogiri-talk](http://groups.google.com/group/nokogiri-talk)
- [http://github.com/tenderlove/nokogiri/issues](http://github.com/tenderlove/nokogiri/issues)

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.

Changes:

### 1.4.1 / 2009/12/10

- New Features

- Bugfixes

## FEATURES:

- XPath support for document searching
- CSS3 selector support for document searching
- XML/HTML builder

Nokogiri parses and searches XML/HTML very quickly, and also has  
correctly implemented CSS3 selector support as well as XPath support.

Here is a speed test:

- [Result · GitHub](http://gist.github.com/24605)

## SUPPORT:

The Nokogiri {mailing  
list}[[http://groups.google.com/group/nokogiri-talk](http://groups.google.com/group/nokogiri-talk)]  
is available here:

- [http://groups.google.com/group/nokogiri-talk](http://groups.google.com/group/nokogiri-talk)

The {bug tracker}[[http://github.com/tenderlove/nokogiri/issues](http://github.com/tenderlove/nokogiri/issues)]  
is available here:

- [http://github.com/tenderlove/nokogiri/issues](http://github.com/tenderlove/nokogiri/issues)

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(‘[tenderlove - Google Search](http://www.google.com/search?q=tenderlove)’))

# 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

---

<div class="post-metadata">

**Author:** ![aaronpowell](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/7bcc69/32.png) [@aaronpowell](https://www.ruby-forum.com/u/aaronpowell)\
**Post date:** [December 11, 2009, 8:55pm UTC](https://www.ruby-forum.com/t/nokogiri-1-4-1-released/180088/2 "2009-12-11T20:55:42Z")

</div>

Good to hear mate – and I have to admit, Nokogiri is quite possibly  
the most elegant XML/HTML parser I’ve ever used.

Just letting you know your work is thoroughly appreciated.

---

<div class="post-metadata">

**Author:** ![aaronpowell](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/7bcc69/32.png) [@aaronpowell](https://www.ruby-forum.com/u/aaronpowell)\
**Post date:** [December 11, 2009, 10:25pm UTC](https://www.ruby-forum.com/t/nokogiri-1-4-1-released/180088/3 "2009-12-11T22:25:50Z")

</div>

On 2009-12-11, Bapabooiee [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> Good to hear mate – and I have to admit, Nokogiri is quite possibly  
> the most elegant XML/HTML parser I’ve ever used.
> 
> Just letting you know your work is thoroughly appreciated.

+1

I recently needed to script up a web scraper and Nokogiri was the  
hammer that hit the nail of the problem squarely on the head. Thank  
you for an excellent piece of work.

Regards,

Jeremy H.

---

<div class="post-metadata">

**Author:** ![aaronpowell](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/7bcc69/32.png) [@aaronpowell](https://www.ruby-forum.com/u/aaronpowell)\
**Post date:** [December 11, 2009, 11:12pm UTC](https://www.ruby-forum.com/t/nokogiri-1-4-1-released/180088/4 "2009-12-11T23:12:39Z")

</div>

On Dec 11, 2009, at 13:25 , Jeremy H. wrote:

> you for an excellent piece of work.  
> next time I’d suggest using mechanize.

---

<div class="post-metadata">

**Author:** ![aaronpowell](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/7bcc69/32.png) [@aaronpowell](https://www.ruby-forum.com/u/aaronpowell)\
**Post date:** [December 12, 2009, 7:34pm UTC](https://www.ruby-forum.com/t/nokogiri-1-4-1-released/180088/5 "2009-12-12T19:34:03Z")

</div>

On Sat, Dec 12, 2009 at 06:25:05AM +0900, Jeremy H. wrote:

> you for an excellent piece of work.  
> Thanks guys! It’s good to hear nice things once in a while. 😃

Thanks for using nokogiri, and if you run in to bugs, make sure to  
report them!

---

<div class="post-metadata">

**Author:** ![aaronpowell](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/7bcc69/32.png) [@aaronpowell](https://www.ruby-forum.com/u/aaronpowell)\
**Post date:** [December 12, 2009, 12:33pm UTC](https://www.ruby-forum.com/t/nokogiri-1-4-1-released/180088/6 "2009-12-12T12:33:16Z")

</div>

On 2009-12-11, Ryan D. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> On Dec 11, 2009, at 13:25 , Jeremy H. wrote:
> 
> > I recently needed to script up a web scraper and Nokogiri was the  
> > hammer that hit the nail of the problem squarely on the head. Thank  
> > you for an excellent piece of work.
> 
> next time I’d suggest using mechanize.

I’ll keep it in mind, thanks. _sigh_, so many toys, so little time!  
🙂

Jeremy H.

---

<div class="post-metadata">

**Author:** ![aaronpowell](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/7bcc69/32.png) [@aaronpowell](https://www.ruby-forum.com/u/aaronpowell)\
**Post date:** [December 14, 2009, 11:00pm UTC](https://www.ruby-forum.com/t/nokogiri-1-4-1-released/180088/7 "2009-12-14T23:00:49Z")

</div>

On Dec 12, 4:26 am, Jeremy H. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> > next time I’d suggest using mechanize.
> 
> I’ll keep it in mind, thanks. _sigh_, so many toys, so little time! 🙂
> 
> Jeremy H.

You would actually probably want to use a combination of both,  
depending on what you’re doing. You could use Mechanize for crawling &  
scraping the site, and then you use Nokogiri to pry the information  
you want out of the markup.

---

<div class="post-metadata">

**Author:** ![aaronpowell](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/7bcc69/32.png) [@aaronpowell](https://www.ruby-forum.com/u/aaronpowell)\
**Post date:** [December 14, 2009, 11:37pm UTC](https://www.ruby-forum.com/t/nokogiri-1-4-1-released/180088/8 "2009-12-14T23:37:41Z")

</div>

On Dec 14, 2009, at 14:00 , Bapabooiee wrote:

> > > next time I’d suggest using mechanize.
> > 
> > I’ll keep it in mind, thanks. _sigh_, so many toys, so little time! 🙂
> > 
> > Jeremy H.
> 
> You would actually probably want to use a combination of both,  
> depending on what you’re doing. You could use Mechanize for crawling &  
> scraping the site, and then you use Nokogiri to pry the information  
> you want out of the markup.

mechanize already uses nokogiri.
