lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


On Fri, 2008-05-09 at 16:37 +0000, George Petsagourakis wrote:
> Basically I need to access a file named "somefile.xml.bz2" it has an xml inside.
> Any easy ideas how to read the xml to a string without even downloading the file?

Can you say what *precisely* you're trying to do?  Now it sounds like
you're trying to fetch some bzip2ed XML document off a remote server.

However, if you have somefile.xml.bz2 as a local file, this will give
you the XML file as a string:

   myxml = io.popen("bunzip2 -c somefile.xml.bz2", "r"):read("*a")

B.