Displaying 1 result from an estimated 1 matches for "makefootprintcontrol".
2007 Sep 29
2
REXML - XML query only returning one (last) result
...Rails, and I''m trying to read an XML file
with REXML. No matter what I try, I am only getting the last result
returned from my query. I should be getting 365 results. Here is the
code:
include REXML
require ''rexml/document''
require ''rexml/xpath''
class MakeFootprintController < ApplicationController
def index
file = File.new("#{RAILS_ROOT}/xml/footprints.xml")
doc = Document.new(file)
doc.each_element(''//day'') { |day|
render_text day
}
end
end
Thanks for the help.
--~--~---------~--~----~------------~-------~--~----~
You...