[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Mingw-cross-env-list] TinyXML integration
From: |
Alexandre Bacquart |
Subject: |
[Mingw-cross-env-list] TinyXML integration |
Date: |
Sat, 24 Jul 2010 14:59:37 +0200 |
User-agent: |
Mozilla/5.0 (X11; U; Linux i686 (x86_64); en-US; rv:1.9.1.10) Gecko/20100619 Icedove/3.0.5 |
Hi guys,
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.
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 comparison)
So I decided to integrate it in MCE. Please see attached patch.
Details:
- This patch is focused on C++ use of tinyxml.
- I tweaked the update rule and it worked for me (tried it with an older
version specified)
- I added a test program. Most of its code has been taken from the
tinyxml tutorial at:
http://www.grinninglizard.com/tinyxmldocs/tutorial0.html.
The test program takes a xml file as argument and just parses it to
stdout. So yes, this is not a "strict-minimal-standalone" test, so feel
free to replace it with something more appropriate if needed, it should
be easy enough.
- Specific to current Debian testing repository (squeeze): regarding the
test program, it seems there is a little interface difference between
tinyxml's very last version (2.6.1) and the one available on Debian
queeze (2.5.3). It is about some renamed enumerations (like
TiXmlNode::DOCUMENT renamed in TiXmlNode::TINYXML_DOCUMENT). I wonder
why they did that. Anyway, I decided to simply ignore it for the purpose
of MCE and simply used last version names in the test program. That
makes the thing currently not portable without some few #ifdef in real
projects built on Debian (not mine, I don't use those enum :) ), but
only until Debian catch-up, that should not be a big deal.
- Even if tinyxml is really simple to use, it would be nice to have
pkg-config stuff. For instance, I don't really know how to make it
clean, so I left it for you guys.
Regards,
--
Alex
MCE_tinyxml-1-tinyxml_integration.patch
Description: Text Data
- [Mingw-cross-env-list] TinyXML integration,
Alexandre Bacquart <=