Charles L. Snyder 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}

quiz.push element.text

An element has tags and content, so you have to ask for that content.

James

-- 

http://www.ruby-doc.org - The Ruby Documentation Site
http://www.rubyxml.com  - News, Articles, and Listings for Ruby & XML
http://www.rubystuff.com - The Ruby Store for Ruby Stuff
http://www.jamesbritt.com  - Playing with Better Toys