From: Guido de Melo Date: 2005-11-15T00:02:57+09:00 Subject: trouble reading a gzipped xml-file Hi, I'm trying to read a gzipped xml-file into rexml, but I don't quite succeed. Perhaps someone can help me. Till now I tried this: #!/usr/bin/ruby -w require 'zlib' require 'rexml/document' Zlib::GzipReader.open('file.dia') {|gz| print gz.read } # this prints everything nicely and it works f = Zlib::GzipReader.open("file.dia") s = f.read p s # now the ungzipped contents are in s, they look like this however: # "\n\n # \n \n # all in one line and encapsulated in "" # so of course the next command fails xmldoc = REXML::Document.new s p xmldoc # gives: ... Any ideas on this? This can't be too difficult, I think... Guido