From: Phlip Date: 2007-07-20T11:10:01+09:00 Subject: Re: rexml/document problem Cool Wong wrote: > > > > > > > > > > [/code] > > This is my xml file data. There include several in the xml file. i > can read the 1st data: > > puts root.elements["b"].attributes["prefix"] > > Now i cannot read the 1 by 1. How can i read the and write the > output is: > > "A" > "B" > "C" > "D" > "E" REXML::XPath.each(root, '//b') do |node| p node.text end -- Phlip http://www.oreilly.com/catalog/9780596510657/ "Test Driven Ajax (on Rails)" assert_xpath, assert_javascript, & assert_ajax