XML Ruby

orders_xml = %{

  
    1
    02/10/2008
    C
    
      
      
    

  

}
require 'rexml/document'
orders = REXML::Document.new(orders_xml)
my_order = orders.root.elements[1]
first_node = my_order.elements[1]
first_node.name                                      # => "number"
first_node.next_element.name                         # => "date"
first_node.parent.name                               # => "order"