class Nokogiri::HTML::Document

def serialize options = {}


end
config.format.as_xml
node.serialize(:encoding => 'UTF-8') do |config|

or

node.serialize(:encoding => 'UTF-8', :save_with => FORMAT | AS_XML)

These two statements are equivalent:

block. See SaveOptions.
Serialize Node using +options+. Save options can also be set using a
###
def serialize options = {}
  options[:save_with] ||= XML::Node::SaveOptions::DEFAULT_HTML
  super
end