Skip to content

Instantly share code, notes, and snippets.

@rsim
Created January 25, 2011 19:59
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save rsim/6214390256868cd3c56a to your computer and use it in GitHub Desktop.
Save rsim/6214390256868cd3c56a to your computer and use it in GitHub Desktop.
Differences between Nokogiri 1.4 and 1.5 on JRuby
require "rubygems"
# gem "nokogiri", "1.4.4.2"
gem "nokogiri", "1.5.0.beta.3"
require "nokogiri"
doc = Nokogiri::XML::Builder.new do |xml|
xml.node :name => 'some "quoted" word', :x=>1, :y=>2, :z=>3, :a=>4, :b=>5, :c=>6
end
puts doc.to_xml
# Nokogiri 1.4.4.2
# <node name="some &quot;quoted&quot; word" x="1" y="2" z="3" a="4" b="5" c="6"/>
# Nokogiri 1.5.0.beta.3
# <node a="4" b="5" c="6" name="some %22quoted%22 word" x="1" y="2" z="3"/>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment