module MultiXml::Parsers::Nokogiri
def parse(xml)
xml::
Parse an XML Document string or IO into a simple hash using libxml / nokogiri.
def parse(xml) if !xml.respond_to?(:read) xml = StringIO.new(xml || '') end char = xml.getc if char.nil? {} else xml.ungetc(char) doc = ::Nokogiri::XML(xml) raise doc.errors.first if doc.errors.length > 0 doc.to_hash end end
def parse_error; ::Nokogiri::XML::SyntaxError; end
def parse_error; ::Nokogiri::XML::SyntaxError; end