From: "Matthias S." Date: 2011-01-29T21:00:34+09:00 Subject: How to get Nokogiri to resolve XPath references when parsing XML? A lot has been written about Nokogiri in terms of reading XML using XPath. However, what's about using Nokogiri with XML containing XPath references. In the example, the xml contains a XPath reference: ... ... Since both location elements are equal, only the first element is described in detail. The second just references the first. Using Nokogiri, xml.xpath('//location') returns two node instances as expected. The first node contains all child nodes. The second only a reference as an attribute of the second node instance. Ok, assuming I want to request all longitude values, I would do xml.xpath('//location/longitude'). This returns only one node instance. However, since there are actually two elements of type "longitude", I expected to receive two node instances, expecting Nokogiri to resolve XPath references... How do I achieve this with Nokogiri? -- Posted via http://www.ruby-forum.com/.