From: brabuhr@... Date: 2010-10-27T09:25:07+09:00 Subject: Re: REXML advice - output > > 84 > > 0 > > BLAH LAH > 12345 > > > > NEXT ITEM AS BOVE Data DoneList Vector Count /Count FullItemInfo Count /Count ItemInfo Title /Title Id /Id /ItemInfo /Vector /DoneList FullItemInfo The XML example you provided seems to have mismatched tags? > Then I have further data, which is slightly different > 84 > > 0 > > BLAH LAH > 12345 > > > > NotDoneList Vector Count /Count FullItemInfo Count /Count ItemInfo Title /Title Id /Id /ItemInfo /Vector /DoneList FullItemInfo /Data > doc.elements.each("//NotDoneList/Vector/Count/FullItemInfo") > doc.elements.each("//DoneList/Vector/Count/FullItemInfo") do |e| Can you verify and re-post a clean XML snippet? (That may help debug your XPath.) I'm going to guess: In which case, the XPath might be: '//DoneList/Vector/FullItemInfo'?