Class: MultiXml::Parsers::LibxmlSax::Handler Private
- Inherits:
-
Object
- Object
- MultiXml::Parsers::LibxmlSax::Handler
- Includes:
- LibXML::XML::SaxParser::Callbacks, SaxHandler
- Defined in:
- lib/multi_xml/parsers/libxml_sax.rb
Overview
This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.
LibXML SAX handler that builds a hash tree while parsing
Instance Attribute Summary
Attributes included from SaxHandler
Instance Method Summary collapse
-
#initialize ⇒ Handler
constructor
private
Create a new SAX handler.
-
#on_characters(text) ⇒ void
(also: #on_cdata_block)
private
Handle character data.
-
#on_end_document ⇒ void
private
Handle end of document (no-op).
-
#on_end_element(_name) ⇒ void
private
Handle end of an element.
-
#on_error(_error) ⇒ void
private
Handle parse errors (no-op, LibXML raises directly).
-
#on_start_document ⇒ void
private
Handle start of document (no-op).
-
#on_start_element(name, attrs = {}) ⇒ void
private
Handle start of an element.
Methods included from SaxHandler
Constructor Details
#initialize ⇒ Handler
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.
Create a new SAX handler
48 49 50 |
# File 'lib/multi_xml/parsers/libxml_sax.rb', line 48 def initialize initialize_handler end |
Instance Method Details
#on_characters(text) ⇒ void Also known as: on_cdata_block
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.
Handle character data
98 |
# File 'lib/multi_xml/parsers/libxml_sax.rb', line 98 def on_characters(text) = append_text(text) |
#on_end_document ⇒ 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.
Handle end of document (no-op)
63 64 |
# File 'lib/multi_xml/parsers/libxml_sax.rb', line 63 def on_end_document end |
#on_end_element(_name) ⇒ 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.
Handle end of an element
89 90 91 |
# File 'lib/multi_xml/parsers/libxml_sax.rb', line 89 def on_end_element(_name) handle_end_element end |
#on_error(_error) ⇒ 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.
Handle parse errors (no-op, LibXML raises directly)
71 72 |
# File 'lib/multi_xml/parsers/libxml_sax.rb', line 71 def on_error(_error) end |
#on_start_document ⇒ 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.
Handle start of document (no-op)
56 57 |
# File 'lib/multi_xml/parsers/libxml_sax.rb', line 56 def on_start_document end |
#on_start_element(name, attrs = {}) ⇒ 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.
Handle start of an element
80 81 82 |
# File 'lib/multi_xml/parsers/libxml_sax.rb', line 80 def on_start_element(name, attrs = {}) handle_start_element(name, attrs) end |