Class: KXML::SAXParser
- Inherits:
-
Object
- Object
- KXML::SAXParser
- Defined in:
- lib/xml/xml_parser.rb
Constant Summary collapse
- START_TAG =
'START_TAG'
- END_TAG =
'END_TAG'
- COMMENTS =
'COMMENTS'
- SELF_CLOSE_TAG =
'SELF_COLSE_TAG'
- DOCUMENT_STATEMENT =
'DOCUMENT_STATEMENT'
- CONTENT =
'CONTENT'
Instance Attribute Summary collapse
-
#handler ⇒ Object
Returns the value of attribute handler.
Instance Method Summary collapse
- #<<(data) ⇒ Object
- #finish ⇒ Object
-
#initialize ⇒ SAXParser
constructor
A new instance of SAXParser.
- #push(data) ⇒ Object
- #reset ⇒ Object
Constructor Details
#initialize ⇒ SAXParser
Returns a new instance of SAXParser.
11 12 13 |
# File 'lib/xml/xml_parser.rb', line 11 def initialize reset() end |
Instance Attribute Details
#handler ⇒ Object
Returns the value of attribute handler.
10 11 12 |
# File 'lib/xml/xml_parser.rb', line 10 def handler @handler end |
Instance Method Details
#<<(data) ⇒ Object
21 22 23 |
# File 'lib/xml/xml_parser.rb', line 21 def <<(data) push(data) end |
#finish ⇒ Object
30 31 32 33 |
# File 'lib/xml/xml_parser.rb', line 30 def finish @finish = true parse() end |
#push(data) ⇒ Object
25 26 27 28 |
# File 'lib/xml/xml_parser.rb', line 25 def push(data) @data += data parse() end |
#reset ⇒ Object
15 16 17 18 19 |
# File 'lib/xml/xml_parser.rb', line 15 def reset @state = :NONE @data = '' @finish = false end |