diff --git a/src/datastore_mad/remotes/xpath.rb b/src/datastore_mad/remotes/xpath.rb index cf41516b9e..fb2417b874 100755 --- a/src/datastore_mad/remotes/xpath.rb +++ b/src/datastore_mad/remotes/xpath.rb @@ -58,8 +58,14 @@ end xml = REXML::Document.new(tmp).root ARGV.each do |xpath| - element = xml.elements[xpath.dup] - values << element.text.to_s if !element.nil? + if xpath.match(/^%m%/) + xpath = xpath[3..-1] + ar = xml.elements.to_a(xpath).map {|t| t.text } + values << ar.join(' ') + else + element = xml.elements[xpath.dup] + values << element.text.to_s if !element.nil? + end values << "\0" end