The old XPath "position() = 1" would work in Nokogiri due to the way they retrieve descendants. In Oga however this would simply always return the first node. To fix this Oga now counts the amount of preceding siblings that match the same full name. |
||
|---|---|---|
| .. | ||
| oga | ||
| oga.rb | ||