Module: Wrongdoc::ParseXML

Included in:
Final, Merge, Rdoc
Defined in:
lib/wrongdoc/parse_xml.rb

Instance Method Summary collapse

Instance Method Details

#parse_xml(str) ⇒ Object



2
3
4
5
6
7
8
9
10
# File 'lib/wrongdoc/parse_xml.rb', line 2

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