Class: WinevtBookmarkDocument
- Inherits:
-
Nokogiri::XML::SAX::Document
- Object
- Nokogiri::XML::SAX::Document
- WinevtBookmarkDocument
- Defined in:
- lib/fluent/plugin/bookmark_sax_parser.rb
Instance Attribute Summary collapse
-
#result ⇒ Object
readonly
Returns the value of attribute result.
Instance Method Summary collapse
- #characters(string) ⇒ Object
- #end_document ⇒ Object
- #end_element(name, attributes = []) ⇒ Object
-
#initialize ⇒ WinevtBookmarkDocument
constructor
A new instance of WinevtBookmarkDocument.
- #start_document ⇒ Object
- #start_element(name, attributes = []) ⇒ Object
Constructor Details
#initialize ⇒ WinevtBookmarkDocument
Returns a new instance of WinevtBookmarkDocument.
6 7 8 9 |
# File 'lib/fluent/plugin/bookmark_sax_parser.rb', line 6 def initialize @result = {} super end |
Instance Attribute Details
#result ⇒ Object (readonly)
Returns the value of attribute result.
4 5 6 |
# File 'lib/fluent/plugin/bookmark_sax_parser.rb', line 4 def result @result end |
Instance Method Details
#characters(string) ⇒ Object
22 23 |
# File 'lib/fluent/plugin/bookmark_sax_parser.rb', line 22 def characters(string) end |
#end_document ⇒ Object
28 29 |
# File 'lib/fluent/plugin/bookmark_sax_parser.rb', line 28 def end_document end |
#end_element(name, attributes = []) ⇒ Object
25 26 |
# File 'lib/fluent/plugin/bookmark_sax_parser.rb', line 25 def end_element(name, attributes = []) end |
#start_document ⇒ Object
11 12 |
# File 'lib/fluent/plugin/bookmark_sax_parser.rb', line 11 def start_document end |
#start_element(name, attributes = []) ⇒ Object
14 15 16 17 18 19 20 |
# File 'lib/fluent/plugin/bookmark_sax_parser.rb', line 14 def start_element(name, attributes = []) if name == "Bookmark" @result[:channel] = attributes[0][1] rescue nil @result[:record_id] = attributes[1][1].to_i rescue nil @result[:is_current] = attributes[2][1].downcase == "true" rescue nil end end |