• + 0 comments

    require 'rexml/document' include REXML

    xmlText = "movies.xml"

    while line = gets() xmlText += line end

    doc = Document.new xmlText

    puts doc.elements.each("collection/movie//popularity/text()")