Class: MultiXml::Parsers::NokogiriSax::Handler Private
- Inherits:
-
Nokogiri::XML::SAX::Document
- Object
- Nokogiri::XML::SAX::Document
- MultiXml::Parsers::NokogiriSax::Handler
- Includes:
- SaxHandler
- Defined in:
- lib/multi_xml/parsers/nokogiri_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.
Nokogiri SAX handler that builds a hash tree while parsing
Instance Attribute Summary
Attributes included from SaxHandler
Instance Method Summary collapse
-
#characters(text) ⇒ void
(also: #cdata_block)
private
Handle character data.
-
#end_document ⇒ void
private
Handle end of document (no-op).
-
#end_element(_name) ⇒ void
private
Handle end of an element.
-
#error(message) ⇒ void
private
Handle parse errors.
-
#initialize ⇒ Handler
constructor
private
Create a new SAX handler.
-
#start_document ⇒ void
private
Handle start of document (no-op).
-
#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
44 45 46 47 |
# File 'lib/multi_xml/parsers/nokogiri_sax.rb', line 44 def initialize super initialize_handler end |
Instance Method Details
#characters(text) ⇒ void Also known as: 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
97 |
# File 'lib/multi_xml/parsers/nokogiri_sax.rb', line 97 def characters(text) = append_text(text) |
#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)
60 61 |
# File 'lib/multi_xml/parsers/nokogiri_sax.rb', line 60 def end_document end |
#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
88 89 90 |
# File 'lib/multi_xml/parsers/nokogiri_sax.rb', line 88 def end_element(_name) handle_end_element end |
#error(message) ⇒ 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
69 70 71 |
# File 'lib/multi_xml/parsers/nokogiri_sax.rb', line 69 def error() raise ::Nokogiri::XML::SyntaxError, end |
#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)
53 54 |
# File 'lib/multi_xml/parsers/nokogiri_sax.rb', line 53 def start_document end |
#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
79 80 81 |
# File 'lib/multi_xml/parsers/nokogiri_sax.rb', line 79 def start_element(name, attrs = []) handle_start_element(name, attrs) end |