
The XMLUtilsPool module provides an abstraction of the underlying XML parser engine. It provides XML-related methods for the Pools
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