tags:

views:

1423

answers:

6

I really need help with finding a program which will allow me to edit xml.gz files. To be honest I'm not even sure what a xml.gz file is for that matter. If it's a compressed xml file then I would also like to ask how to compress a xml file. So to sum it up I'd like to know some program suggestions and an explanation about xml.gz files.

+2  A: 

It's just a compressed .xml file. e.g. to create

gzip file.xml

which creates the file with the suffix .gz.

And to decompress

gunzip file.xml.gz

(The gzip utilities will likely be standard on your Unix, or they're available via Cygwin for Windows).

Note that some editors will let you edit the .gz file by uncompressing it on the fly for you, so you don't need to uncompress then edit (e.g. vim)

Brian Agnew
and to uncompress to stdout, zcat file.xml.gz
ysth
A: 
Alberto Zaccagni
A: 

You can find executables at http://www.gzip.org/

Ulrik Rasmussen
A: 

You can uncompress an xml.gz file on a standard Linux distribution with the command

gunzip file.xml.gz

And likewise compress it with the command

gzip file.xml

On windows you can use your favorite archive manager or use 7zip if you don't have one.

Otto Allmendinger
A: 

Create the XML file with any tool.

after that, if on Unix/Linux - you may use gzip:

To compress

$gzip <path>/filename.xml

You will have the compressed filename.xml.gz in the same folder.

To decompress

$gzip -d <path>/filename.xml.gz

In case of windows, you may use 7zip

Mohit Nanda
+1  A: 

(to nudge the thread programming-wards)

To read/write gzip files programatically, one could try the zlib library which enables read/write to gzip files using a similar interfaces to fopen/fwrite/fclose.

http://www.zlib.net/manual.html#gzopen

In python, it's a lot simpler -- using the gzip module: http://www.doughellmann.com/PyMOTW/gzip/

lsc