Re: [xml] Re: Compression?!



Thomas Rokohl writes:

mhm, but as i pack the file with

gzip -c myfile.xml

the lib can not read it. if i search in the internet for an xml.gz file

the lib can read it. so what is wrong? how do I have to pack up the file?

It's supposed to work with data packed that way.

Did you compile with libz support?
What platform do you use? What libxml version? 
Does xmllint read compressed files?

I cannot see any problem here with 
gzip -c test.xml | xmllint --noout -
It does the the same as 
cat test.xml | xmllint --noout -

for xmllint: using libxml version 20504
   compiled with: FTP HTTP HTML C14N Catalog DocBook XPath XPointer XInclude Iconv Unicode Regexps Automata 
Schemas 
on linux.

I guess ldd is the easiest way on unix/linux to see if libz is included:
ldd /usr/local/bin/xmllint
        libxml2.so.2 => /usr/local/lib/libxml2.so.2 (0x40016000)
        libz.so.1 => /lib/libz.so.1 (0x40106000)
        libm.so.6 => /lib/libm.so.6 (0x40115000)
        libc.so.6 => /lib/libc.so.6 (0x40137000)
        /lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0x40000000)

If libz does not show up, you shouldn't be suprised that it won't do
anything...




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