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 201
201:         def initialize(xml=nil)
202:             super(xml)
203:         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 207
207:         def each_element(block)
208:             if NOKOGIRI
209:                 @xml.xpath(
210:                     "#{@element_name}").each {|pelem|
211:                     block.call self.factory(pelem)
212:                 }
213:             else
214:                 @xml.elements.each(
215:                     "#{@element_name}") {|pelem|
216:                     block.call self.factory(pelem)
217:                 }
218:             end
219:         end