class Nokogiri::HTML::DocumentFragment

def self.parse tags, encoding = nil

Create a Nokogiri::XML::DocumentFragment from +tags+, using +encoding+
###
def self.parse tags, encoding = nil
  doc = HTML::Document.new
  encoding ||= tags.respond_to?(:encoding) ? tags.encoding.name : 'UTF-8'
  doc.encoding = encoding
  new(doc, tags)
end