From: "Jesús Gabriel y Galán" Date: 2011-11-24T21:23:20+09:00 Subject: Re: NOKIGIRI XPATH On Thu, Nov 24, 2011 at 12:30 PM, Ruby Mania wrote: > Thanks a lot for help. But it matched CDEF and all nodes after that even > if key != english > I'm not sure why is this. I'm still trying to come up with a good XPath that will return just that node, but in the meantime you can do this: doc.xpath("//key[. = 'English']/following-sibling::topic/data")[0] Jesus.