Re: [xml] Compression problem using Zlib



Igor,
I changed the the library path "libxml2-2.5.5.win32" with the new library
which you send me for zlib compatibility. Updated the new libxml2.dll which
is in my ./Debug folder with the program. But when I set compression flag
and call the xmlSaveFile I get an Access Violation Error. If I dont use
compression option there is no problem..

#define _WINDOWS
#define ZLIB_DLL
#include "zlib.h"

#include <libxml/tree.h>
#include <libxml/parser.h>

..xml Doc Creation process..

int nComp = xmlGetDocCompressMode(doc);
xmlSetDocCompressMode(doc, 2);
//OR xmlSetCompressMode(2);

xmlSaveFile("c:\\VEReq.xml", doc);//ERROR Access Violation

Igor what 's the reason of this error?
Thank you,
Arda

----- Original Message -----
From: "Igor Zlatkovic" <igor zlatkovic com>
To: "Arda Tekin" <arda tekin softhome net>
Cc: <xml gnome org>
Sent: Thursday, March 27, 2003 2:48 PM
Subject: Re: [xml] Compression problem using Zlib


Hi,

Do you use the precompiled libxml binaries?

The precompiled binaries do not support zlib. Doing this would give
another dependency on Windows and many would roast my liver for that.

You will have to grab the source, change the relevant parameters and
recompile with zlib support.

Ciao,
Igor

On Thu, Mar 27, 2003 at 02:28:32PM +0200, Arda Tekin wrote:
I develop a project which builds a xml file. Building and saving process
for a valid xmlDocPtr object is successful. And saved xml file is well
formatted. But I need to compress this file before saving it. I used zlib
win32 dll version.
(ZLib 1.1.4 for Win98/NT)
Files are:
zlib114dll/dll32/zlib.dll
zlib114dll/dll32/zlib.lib

#define _WINDOWS
#define ZLIB_DLL
#include "zlib.h"

..Xml Create process...
int nComp = xmlGetDocCompressMode(doc);
xmlSetDocCompressMode(doc, 9);
xmlSaveFile("c:\\VEReq.xml", doc);

Compiles and links without any error.
XML document are saved to disk without compressed. I mean, program works
same as uncompressed mode. Saved file is well formatted xml document.

How will I use compression option in libxml?
Thanks in advance.





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