On 6/6/05, Charles L. Snyder <csnyder1 / kc.rr.com> wrote:
> But, I can't figure out A) how to get at the vaules in the <CHOICE> nodes -
> the code below just gives me results of the form "<CHOICE>6</CHOICE>"
> 
> require "rexml/document"
> include REXML
> doc = Document.new File.new("myQuiz.xml")
> quiz=[]
> doc.elements.each("QUIZ/QUESTION/CHOICE") { |element| quiz.push element}
> puts  quiz

doc.elements.each("QUIZ/QUESTION/CHOICE") { |element|
   p element.text
}

-- 
Premshree Pillai
http://www.livejournal.com/users/premshree/