def to_xhtml options = {}
if options.is_a?(String)
options = { :encoding => options }
$stderr.puts("Node#to_xml(encoding) is deprecated and will be removed in\nNokogiri version 1.4.0 *or* after June 1 2009.\nYou called to_xhtml from here:\n\n\#{caller.first}\n\nPlease change to Node#to_xhtml(:encoding => \#{options})\n")
end
return dump_html if %w[2 6] === LIBXML_VERSION.split('.')[0..1]
options[:save_with] ||= SaveOptions::FORMAT |
SaveOptions::NO_DECLARATION |
SaveOptions::NO_EMPTY_TAGS |
SaveOptions::AS_XHTML
serialize(options)
end