Module: MultiXml::Parsers::Rexml Private

Extended by:
Rexml
Included in:
Rexml
Defined in:
lib/multi_xml/parsers/rexml.rb

Overview

This module is part of a private API. You should avoid using this module if possible, as it may be removed or be changed in the future.

XML parser using Ruby's built-in REXML library

Instance Method Summary collapse

Instance Method Details

#parse(io) ⇒ Hash

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Parse XML from an IO object

Raises:

  • (REXML::ParseException)

    if XML is malformed



23
24
25
26
# File 'lib/multi_xml/parsers/rexml.rb', line 23

def parse(io)
  doc = REXML::Document.new(io)
  element_to_hash({}, doc.root)
end

#parse_errorClass

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Get the parse error class for this parser



15
# File 'lib/multi_xml/parsers/rexml.rb', line 15

def parse_error = ::REXML::ParseException