You are viewing a single comment's thread. Return to all comments →
Answer:
require 'rexml/document' include REXML xmlText = "movies.xml"
while line = gets() xmlText += line end
doc = Document.new xmlText puts doc.elements.each("collection/movie/@title")
Seems like cookies are disabled on this browser, please enable them to open this website
Querying XML Datastores with XPath - 1
You are viewing a single comment's thread. Return to all comments →
Answer:
require 'rexml/document' include REXML xmlText = "movies.xml"
while line = gets() xmlText += line end
doc = Document.new xmlText puts doc.elements.each("collection/movie/@title")