From: Mark Thomas Date: 2008-09-17T00:27:39+09:00 Subject: Re: ruby / rexml / xpath bug? On Sep 15, 5:48 pm, altinsel wrote: > Mark, > > Thank you.  The './/' syntax seems to work. (I'm very happy about > that). > > Now if you don't mind I'd like to ask: as far as I understand it, the > "each_element" method should only be plucking a specific branch > ("place") off the tree, and that branch is a new, stand-alone tree, > and shouldn't even have the first element's data, let alone the rest > of the tree.  I even So how was that information even getting in > there? In XPath, the prefix '//' means start from the top of the tree, not the 'current' node or "branch". And I agree with Robert, the code is far from ideal; there is far too much iteration. The code could be much simpler and more efficient. See my diatribe on this here: http://markthomas.org/2008/08/22/eschew-xpathic-iteration/ -- Mark.