Skip to content

Instantly share code, notes, and snippets.

@SeanTAllen
Created November 3, 2010 00:29
Show Gist options
  • Save SeanTAllen/660590 to your computer and use it in GitHub Desktop.
Save SeanTAllen/660590 to your computer and use it in GitHub Desktop.
require 'rubygems'
require 'nokogiri'
page = <<EOS
<head>
<title>Test</title>
</head>
EOS
puts Nokogiri::HTML.fragment( page ).inspect
puts Nokogiri::XML.fragment( page ).inspect
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment