# \[ANN\] nokogiri 1.5.6 Released

**URL:** <https://rubytalk.org/t/ann-nokogiri-1-5-6-released/66917>\
**Category:** ruby-talk\
**Created:** [19 December 2012 16:49 UTC](https://rubytalk.org/t/ann-nokogiri-1-5-6-released/66917 "2012-12-19T16:49:57Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Mike\_Dalessio1](https://yyz1.discourse-cdn.com/flex029/user_avatar/rubytalk.org/mike_dalessio1/32/1903_2.png) [@Mike\_Dalessio1](https://rubytalk.org/u/Mike_Dalessio1)\
**Post date:** [19 December 2012 16:49 UTC](https://rubytalk.org/t/ann-nokogiri-1-5-6-released/66917/1 "2012-12-19T16:49:57Z")

</div>

nokogiri version 1.5.6 has been released!

\* \<[http://nokogiri.org](http://nokogiri.org)\>  
\* \<[http://github.com/sparklemotion/nokogiri/wikis](http://github.com/sparklemotion/nokogiri/wikis)\>  
\* \<[http://github.com/sparklemotion/nokogiri/tree/master](http://github.com/sparklemotion/nokogiri/tree/master)\>  
\* \<[http://groups.google.com/group/nokogiri-talk](http://groups.google.com/group/nokogiri-talk)\>  
\* \<[http://github.com/sparklemotion/nokogiri/issues](http://github.com/sparklemotion/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.5.6 / 2012-12-19

\* Features

&nbsp;&nbsp;\* Improved performance of XML::Document#collect\_namespaces. #761 (Thanks,  
Juergen Mangler!)  
&nbsp;&nbsp;\* New callback SAX::Document#processing\_instruction (Thanks, Kitaiti  
Makoto!)  
&nbsp;&nbsp;\* Node#native\_content= allows setting unescaped node contant. #768  
&nbsp;&nbsp;\* XPath lookup with namespaces supports symbol keys. #729 (Thanks, Ben  
Langfeld.)  
&nbsp;&nbsp;\* XML::Node#[]= stringifies values. #729 (Thanks, Ben Langfeld.)  
&nbsp;&nbsp;\* bin/nokogiri will process a document from $stdin  
&nbsp;&nbsp;\* bin/nokogiri -e will execute a program from the command line  
&nbsp;&nbsp;\* bin/nokogiri --version will print the Xerces and NekoHTML versions when  
ran with JRuby.

\* Bugfixes  
&nbsp;&nbsp;\* Nokogiri now detects XSLT transform errors. #731 (Thanks, Justin  
Fitzsimmons!)  
&nbsp;&nbsp;\* Don't throw an Error when trying to replace top-level text node in  
DocumentFragment. #775  
&nbsp;&nbsp;\* Raise an ArgumentError if an invalid encoding is passed to the SAX  
parser. #756 (Thanks, Bradley Schaefer!)  
&nbsp;&nbsp;\* [JRuby] space prior to xml preamble causes nokogiri to fail parsing.  
(fixed along with #748) #790  
&nbsp;&nbsp;\* [JRuby] Fixed the bug Nokogiri::XML::Node#content inconsistency between  
Java and C. #794, #797  
&nbsp;&nbsp;\* [JRuby] raises INVALID\_CHARACTER\_ERR exception when EntityReference  
name starts with '#'. #719  
&nbsp;&nbsp;\* [JRuby] doesn't coerce namespaces out of strings on a direct subclass  
of Node. #715  
&nbsp;&nbsp;\* [JRuby] Node#content now renders newlines properly. #737 (Thanks, Piotr  
Szmielew!)  
&nbsp;&nbsp;\* [JRuby] Unknown namespace are ignore when the recover option is used.  
#748  
&nbsp;&nbsp;\* [JRuby] XPath queries for namespaces should not throw exceptions when  
called twice in a row. #764  
&nbsp;&nbsp;\* [JRuby] More consistent (with libxml2) whitespace formatting when  
emitting XML. #771  
&nbsp;&nbsp;\* [JRuby] namespaced attributes broken when appending raw xml to builder.  
#770  
&nbsp;&nbsp;\* [JRuby] Nokogiri::XML::Document#wrap raises undefined method `length'  
for nil:NilClass when trying to \<\< to a node. #781  
&nbsp;&nbsp;\* [JRuby] Fixed "bad file descriptor" bug when closing open file  
descriptors. #495  
&nbsp;&nbsp;\* [JRuby] JRuby/CRuby incompatibility for attribute decorators. #785  
&nbsp;&nbsp;\* [JRuby] Issues parsing valid XML with no internal subset in the DTD.  
#547, #811  
&nbsp;&nbsp;\* [JRuby] Issues parsing valid node content when it contains colons. #728  
&nbsp;&nbsp;\* [JRuby] Correctly parse the doc type of html documents. #733  
&nbsp;&nbsp;\* [JRuby] Include dtd in the xml output when a builder is used with  
create\_internal\_subset. #751  
&nbsp;&nbsp;\* [JRuby] builder requires textwrappers for valid utf8 in jruby, not in  
mri. #784
