mirror of
https://github.com/OpenNebula/one.git
synced 2025-03-21 14:50:08 +03:00
B #4896: xpath.rb can't print XPath-specified attributes
Signed-off-by: Ruben S. Montero <rsmontero@opennebula.org>
This commit is contained in:
parent
4c555b0d16
commit
f46d64f785
@ -64,7 +64,13 @@ ARGV.each do |xpath|
|
||||
values << ar.join(' ')
|
||||
else
|
||||
element = xml.elements[xpath.dup]
|
||||
values << element.text.to_s if !element.nil?
|
||||
if !element.nil?
|
||||
if element.class.method_defined?(:text)
|
||||
values << element.text
|
||||
else
|
||||
values << element.to_s
|
||||
end
|
||||
end
|
||||
end
|
||||
values << "\0"
|
||||
end
|
||||
|
Loading…
x
Reference in New Issue
Block a user