Module: EasySax
- Defined in:
- lib/easy_sax.rb,
lib/easy_sax/version.rb
Overview
A simple SAX parser that enables parsing of large files without the messy syntax of typical SAX parsers. Currently depends on Nokogiri.
Basic Usage: EasySax.parser(io).parse_each(target_element, ignore:, array:)
target_element: is the element you want to parse
ignore: are elements that will be ignored and not parsed
arrays: are the elements that should parsed into arrays
You should use a block which returns the parsed target element and it’s ancestors if it has one.
Defined Under Namespace
Classes: ParseError, Parser, SimpleElement
Constant Summary collapse
- VERSION =
"0.1.4"
Class Method Summary collapse
Class Method Details
.parser(io) ⇒ Object
19 20 21 |
# File 'lib/easy_sax.rb', line 19 def self.parser(io) EasySax::Parser.new(io) end |