[Top][All Lists]

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

Re: [Mingw-cross-env-list] TinyXML integration

From: Alexandre Bacquart
Subject: Re: [Mingw-cross-env-list] TinyXML integration
Date: Sat, 24 Jul 2010 22:51:15 +0200
User-agent: Mozilla/5.0 (X11; U; Linux i686 (x86_64); en-US; rv: Gecko/20100619 Icedove/3.0.5

On 07/24/2010 09:55 PM, Volker Grabsch wrote:
Alexandre Bacquart<address@hidden>  schrieb:
After dealing with Xerces successfully, I quickly noticed a sad fact:
it's too damn big for what I need about XML. The static library adds
~35Mo to the final executable.
Although I generally agree, I don't think it's really 35 MB.
Did you strip the debugging symbols before measuring?

You're right. I was talking about the static library size. The added cost on the executable was 'only' ~20Mo.
I did not strip anything too.

Well, undoubtly Xerces has good reasons to be that big, but I don't need
a rocket launcher to kill my flies so I decided to use something
lighter. My first focus was on libxml2. But if libxml2 is a lot lighter
than Xerces (~4Mo and already integrated in MCE), I found there was
something even lighter than that: tinyxml (~120Ko, sure tiny in
General hint: Although Xerces is bigger, it is also more complete
and much more bugfree than libxml2. I don't know about TinyXML,
but be prepared to deal with an incomplete XML implementation.

Well, I've dealt with it in no time and it replaced successfully my sole need of importing some big .dae files (Collada format) generated with Blender. Better than that, it simplified my importer code in many ways.

As I said, I guess there are good reasons for Xerces to be so big, but TBH, I don't need all the mechanisms provided by it. It's a far too big library for my needs here. I only need basic DOM-like parsing and had no problem porting my code to tinyXML.

As a final detail, I still had to use a little hack with Xerces which sometimes returned me text elements with randomly added whitespace characters (those ones "\t\n ") at the end even though texts were not like that in the XML file. Maybe I forgot to do something with Xerces inits, but with tinyXML, I do not need to do this ugly hack anymore:

            size_t wsLastNotOf = str.find_last_not_of("\n\t ") + 1;

So overall, I'm very happy with it.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]