Module: MultiXml::Parsers::SaxHandler Private
- Included in:
- LibxmlSax::Handler, NokogiriSax::Handler
- Defined in:
- lib/multi_xml/parsers/sax_handler.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.
Shared SAX handler logic for building hash trees from XML events
This module provides the core stack-based parsing logic used by both NokogiriSax and LibxmlSax parsers. Including classes must implement the callback methods that their respective SAX libraries expect.
Instance Attribute Summary collapse
-
#result ⇒ Hash
readonly
private
Get the parsed result.
Instance Method Summary collapse
-
#initialize_handler ⇒ void
private
Initialize the handler state.
Instance Attribute Details
#result ⇒ Hash (readonly)
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 parsed result
27 28 29 |
# File 'lib/multi_xml/parsers/sax_handler.rb', line 27 def result @result end |
Instance Method Details
#initialize_handler ⇒ void
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.
This method returns an undefined value.
Initialize the handler state
17 18 19 20 21 |
# File 'lib/multi_xml/parsers/sax_handler.rb', line 17 def initialize_handler @result = {} @stack = [@result] @pending_attrs = [] end |