Re: [xml] Re: Re: Compression?!

Thomas Rokohl writes:

"Thomas Rokohl" <rokohl raygina de> schrieb im Newsbeitrag news:...
 ok, i work with windows version 2.5.7+ for Windows, IA32.
 if i use xml.gz files witch i downloaded from the internet, the parser
You get compressed xml files and xmllint will parse them?
Then libz support is included.

 so now i will compress my own xml-file, but if i do
 gzip -c test.xml

 i get

 error: Start tag expected, '<' not found

 if i try

 gzip -c test.xml | xmllint --noout -

 i get

 -:1: error: Start tag expected, '<' not found


Sounds like a broken gzip (probably only -c is affected).
If you compress to a file, can you decompress the file?

Did you try 'gzip <file>' and parse the created <file>.gz file?

Sorry I have few experience with windows and none with gzip/libxml on

 a second way to pack my files is to read and save it in my own programm,
 but how i can save the xml with compression?!

There is such an option in xmllint. Have a look at it's sources to
see how it is done in the api.


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