Nokogiri 1.5.0 Released

Nokogiri 1.5.0 (“Y U NO RELEASE?” Edition) has been released!

ZOMG GUYS AND GIRLS! It’s been over a year since we announced
1.5.0.beta.1 and the sweet, sweet pure-Java code that replaces LibXML
on JRuby.

We’ve received a lot of feedback from the JRuby community since then,
and although it’s likely that this version is not absolutely perfect,
it’s close enough for rock and roll.

NON-JRUBY PLATFORMS

On non-JRuby platforms, this code is functionally identical to 1.4.7,
so you should be able to upgrade with impunity, with the following
caveats:

  • Support for Ruby 1.8.6 has ended.
    This release will only install on Ruby >=1.8.7.
  • Support for LibXML 2.6.16 and earlier has ended.
    This release will only install with later versions.
  • Support for FFI has ended.

JRUBY

I’d like to make sure that I’m being totally, absolutely clear about
this:

  • On JRuby, Nokogiri 1.5.0 does not use LibXML.
  • On JRuby, Nokogiri 1.5.0 will always use the new pure-Java backend.

So you should probably do some thorough testing of your application
before deploying with this release.

CREDIT

The pure-java backend was built largely through the epic efforts of a
very few developers:

  • Yoko H. (@yokolet)
  • Charles Nutter (@headius)
  • Sergio A. (@serabe)
  • Pat Mahoney (@pmahoney)

Special thanks to Yoko, who has taken on the majority of the
maintenance burden. Arigato gosaimasu, Yoko!

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.

CHANGES in 1.5.0

  • Notes

    • JRuby support is provided by a new pure-java backend.
  • Features

    • extracted sets of Node::SaveOptions into
      Node::SaveOptions::DEFAULT_{X,H,XH}TML (refactor)
  • Bugfixes

    • default output of XML on JRuby is no longer formatted due to
      inconsistent whitespace handling. #415
    • (JRuby) making empty NodeSets with null nodes member safe to
      operate on. #443
    • Fix a bug in advanced encoding detection that leads to partially
      duplicated document when parsing an HTML file with unknown
      encoding.
    • Add support for .
    • Node#inner_text no longer returns nil. (JRuby) #264
  • Deprecations

    • Ruby 1.8.6 is deprecated.
    • LibXML 2.6.16 and earlier are deprecated. Nokogiri will refuse to
      install.
    • FFI support is removed.