
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 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