From: Bertram Scharpf Date: 2009-07-22T21:35:44+09:00 Subject: Re: Parsing XML in Ruby Hi, Am Mittwoch, 22. Jul 2009, 19:15:00 +0900 schrieb Adam Lorens: > Bertram Scharpf wrote: > > Am Mittwoch, 22. Jul 2009, 17:43:09 +0900 schrieb Adam Lorens: > >> xmlfile = File.new("movies.xml") > >> xmldoc = Document.new(xmlfile) > >> > >> # This will output all the movie titles. > >> xmldoc.elements.each("collection"){ > >> |e| puts e.attributes["title"] > >> } > > > > Did you try "xmldoc.root.elements.each( ..."? > > ^^^^^ > > I try Your proposition, but it also doesn't work, because SciTe only > says: > "Root element: New arrivals"( I want more information which is on > XML).My new XML is in attachment. > > Attachments: > http://www.ruby-forum.com/attachment/3893/movies.rb Could you provide the movies.xml file in any way? Bertram -- Bertram Scharpf Stuttgart, Deutschland/Germany http://www.bertram-scharpf.de