You are viewing a single comment's thread. Return to all 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()")
Seems like cookies are disabled on this browser, please enable them to open this website
Querying XML Datastores with XPath - 2
You are viewing a single comment's thread. Return to all 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()")