Class OpenNebula::XMLPool

  1. OpenNebula/XMLUtils.rb
Pool VirtualNetworkPool ClusterPool ImagePool VirtualMachinePool HostPool UserPool XMLElement PoolElement XMLPool User VirtualNetwork Cluster Image VirtualMachine Host Enumerable Client ImageRepository Error OpenNebula dot/f_0.png

The XMLUtilsPool module provides an abstraction of the underlying XML parser engine. It provides XML-related methods for the Pools

Methods

public class

  1. new

public instance

  1. each_element

Public class methods

new (xml=nil)
[show source]
     # File OpenNebula/XMLUtils.rb, line 289
289:         def initialize(xml=nil)
290:             super(xml)
291:         end

Public instance methods

each_element (block)

Executes the given block for each element of the Pool

block:Block
[show source]
     # File OpenNebula/XMLUtils.rb, line 295
295:         def each_element(block)
296:             if NOKOGIRI
297:                 @xml.xpath(
298:                     "#{@element_name}").each {|pelem|
299:                     block.call self.factory(pelem)
300:                 }
301:             else
302:                 @xml.elements.each(
303:                     "#{@element_name}") {|pelem|
304:                     block.call self.factory(pelem)
305:                 }
306:             end
307:         end