• + 0 comments

    ans is

    doc.elements.each("collection/movie[position() mod 2 = 1]") do |movie| puts movie.attributes["title"] end