Class: DataActive::SaxDocument
- Inherits:
-
Nokogiri::XML::SAX::Document
- Object
- Nokogiri::XML::SAX::Document
- DataActive::SaxDocument
- Defined in:
- lib/data_active/sax_document.rb
Instance Method Summary collapse
- #cdata_block(value) ⇒ Object
- #characters(value) ⇒ Object
- #end_document ⇒ Object
- #end_element(name) ⇒ Object
-
#initialize(first_element_name, options = {}) ⇒ SaxDocument
constructor
A new instance of SaxDocument.
- #start_element(name, attr) ⇒ Object
Constructor Details
#initialize(first_element_name, options = {}) ⇒ SaxDocument
Returns a new instance of SaxDocument.
5 6 7 |
# File 'lib/data_active/sax_document.rb', line 5 def initialize(first_element_name, = {}) @parser = DataActive::Parser.new(first_element_name, ) end |
Instance Method Details
#cdata_block(value) ⇒ Object
17 18 19 |
# File 'lib/data_active/sax_document.rb', line 17 def cdata_block(value) @parser.content(value) end |
#characters(value) ⇒ Object
21 22 23 |
# File 'lib/data_active/sax_document.rb', line 21 def characters(value) @parser.content(value) end |
#end_document ⇒ Object
25 26 27 |
# File 'lib/data_active/sax_document.rb', line 25 def end_document @parser.destroy end |
#end_element(name) ⇒ Object
13 14 15 |
# File 'lib/data_active/sax_document.rb', line 13 def end_element(name) @parser.end(name) end |
#start_element(name, attr) ⇒ Object
9 10 11 |
# File 'lib/data_active/sax_document.rb', line 9 def start_element(name, attr) @parser.begin(name) end |