Module: MultiXml::Parsers::Ox Private

Defined in:
lib/multi_xml/parsers/ox.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 the Ox library (fastest pure-Ruby parser)

API:

  • private

Defined Under Namespace

Classes: Handler

Class Method Summary collapse

Class 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

Parameters:

  • IO-like object containing XML

Returns:

  • Parsed XML as a hash

API:

  • private



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

def parse(io)
  handler = Handler.new
  ::Ox.sax_parse(handler, io, convert_special: true, skip: :skip_return)
  handler.result
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

Returns:

  • Ox::ParseError

API:

  • private



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

def parse_error = ::Ox::ParseError