We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
require 'rexml/document'
include REXMLto STDOUT
xmlText = ""
while line = gets()
xmlText += line
end
doc = Document.new xmlText
puts doc.elements.each("collection/movie/popularity/text()")
Querying XML Datastores with XPath - 2
You are viewing a single comment's thread. Return to all comments →
require 'rexml/document' include REXMLto STDOUT xmlText = "" while line = gets() xmlText += line end doc = Document.new xmlText puts doc.elements.each("collection/movie/popularity/text()")
selector query puts doc.elements.each("collection/movie/popularity/text()")