2010/5/23 Hadmut Danisch <hadmut / danisch.de>: > On Sat, May 15, 2010 at 07:55:44AM +0900, Michael Jackson wrote: >> Just FYI, REXML is probably the worst possible XML library available >> for Ruby so I wouldn't waste my time with it if I were you. There are >> lots of better alternatives out there, including libxml-ruby and >> Nokogiri. > > > Well, I feel a little bit annoyed about such recommendations like > "don't use what comes with ruby, get some much better stuff from xyz", > I'll expect ruby to come with working stuff. I don't agree to that assessment of Michael. Whenever I have to deal with XML in Ruby REXML is my first choice and it has worked out remarkably well (if you ignore performance). > The documentation of the libxml-ruby of current ubuntu (generated with > rdoc) is poor. Sometimes it referes to empty pages. > > And something like > > dc =3D xml.find("/document-content") IIRC XPath notation this will only find element "document-content" at root level. You probably rather want "//document-content". > dc.each do |node| > =A0puts "Node #{node}" > end > > does not find anything either. I second Robert, please show the document and probably a bit more code. Kind regards robert --=20 remember.guy do |as, often| as.you_can - without end http://blog.rubybestpractices.com/