From: Chris White Date: 2011-09-05T04:19:20+09:00 Subject: Re: Ruby and XML --_2f3c9ce0-c07d-43de-b553-e396c8dc23c7_ Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable > Here is a snippet of my code >=20 > require "rexml/document" > include REXML >=20 > file1 =3D File.new( "test.xml" ) > doc1 =3D REXML::Document.new file1 > names1 =3D XPath.each(doc1=2C "//name") { |e|} > values1 =3D XPath.each(doc1=2C "//value") { |e|} > now I can parse names1 and values1 and then do the same for the second=20 > XML file. > This approach is not great because it does ensure that the name/value=20 > pairs are siblings. Can you provide this test.xml file or a sample file like it=2C and what the= expected output is? PS: Some docs for ReXML=2C which is now part of the Ruby standard library:h= ttp://furious-waterfall-55.heroku.com/yard_stdlib/REXML.html Regards=2CChris WhiteTwitter: http://www.twitter.com/cwgem = --_2f3c9ce0-c07d-43de-b553-e396c8dc23c7_--