From: "Jesús Gabriel y Galán" Date: 2011-11-25T17:42:33+09:00 Subject: Re: NOKIGIRI XPATH On Thu, Nov 24, 2011 at 5:02 PM, Robert Klemme wrote: > Generally *-sibling refers to all siblings, i.e. sub nodes of the same node > > irb(main):016:0> doc = Nokogiri.XML("12") > => # children=[# children=[#, > # children=[#]>, > # children=[#]>]>]> > > irb(main):017:0> doc.xpath('//k/following-sibling::b').size > => 2 > > irb(main):019:0> puts doc.xpath('//k/following-sibling::b') > 1 > 2 > => nil Hi, Now I see what was wrong with my reasoning. I was misunderstanding the XML structure. Somehow, I thought that the only topic at the same level as the key was the one we wanted to search. Looking more closely I realized that key is at the same level as all other topic nodes in the document. Thanks, Jesus.