Xml - get values

Hi

I have the following xml string that I have loaded into an REXML object
as shown below.

#xml stuff for saveRoute
require ‘rexml/document’
include REXML

Xml = "
sam
this is a test
this is a test2
"

XmlObject = Document.new(Xml)

  1. How can I get the value of name into a string?
  2. Also how can I loop over to get all values of into an
    array?

Thanks
jon

the below sites should help you.

http://www.germane-software.com/software/rexml/
http://www.germane-software.com/software/rexml/docs/tutorial.html
http://www.ruby-doc.org/stdlib/libdoc/rexml/rdoc/index.html