summaryrefslogtreecommitdiff
path: root/lib/wrongdoc/parse_xml.rb
blob: 6d7abe27d1401f0dc4a008e4b12bee2ecade04f9 (plain)
1
2
3
4
5
6
7
8
9
10
11
module Wrongdoc::ParseXML
  def parse_xml(str)
    opts = {
      :input_encoding => 'utf8',
      :output_encoding => 'utf8',
      :wrap => 0,
      :tidy_mark => false,
    }
    Nokogiri::XML(TidyFFI::Tidy.new(str, opts).clean)
  end
end