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
- #end ⇒ 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
24 25 26 |
# File 'lib/xml/xml_parser.rb', line 24 def <<(data) push(data) end |
#end ⇒ Object
33 34 35 36 |
# File 'lib/xml/xml_parser.rb', line 33 def end @end = true parse() end |
#push(data) ⇒ Object
28 29 30 31 |
# File 'lib/xml/xml_parser.rb', line 28 def push(data) @data += data parse() end |
#reset ⇒ Object
15 16 17 18 19 20 21 22 |
# File 'lib/xml/xml_parser.rb', line 15 def reset @state = :NONE @temp_str = nil @is_start_tag = true @quote_state = nil @data = '' @end = false end |