Class: OpenNebula::ParsePoolSax

Inherits:
ParsePoolSaxBase show all
Defined in:
lib/opennebula/xml_utils.rb,
lib/opennebula/xml_utils.rb

Defined Under Namespace

Classes: PoolSax

Instance Method Summary collapse

Methods inherited from ParsePoolSaxBase

#parse

Constructor Details

#initialize(pool_name, elem_name) ⇒ ParsePoolSax

Returns a new instance of ParsePoolSax.



128
129
130
131
# File 'lib/opennebula/xml_utils.rb', line 128

def initialize(pool_name, elem_name)
    super(pool_name, elem_name)
    @parser = Nokogiri::XML::SAX::Parser.new(@pool_sax)
end

Instance Method Details

#sax_parse(str) ⇒ Object



113
114
115
116
117
# File 'lib/opennebula/xml_utils.rb', line 113

def sax_parse(str)
    Ox.sax_parse(@pool_sax, StringIO.new(str),
        :symbolize => false,
        :convert_special => true)
end