Menu

#1 Additional XML providers

open
nobody
None
5
2013-01-09
2011-08-04
No

Actually I see you have embedded TinyXML version 2.5.3. I've also seen it's hardcoded into the files that need it. I would like to abstract the XML provider to allow the inclusion of other providers like RapidXML http://rapidxml.sourceforge.net/

With grep 'TiXml' -r . on the CVars folder I found that is used only in Trie.cpp and CVarMapIO.h (or so it seems to me). My proposal is to create a new header file, CvarXML.h, and that this header includes TinyXML implementation and aliases the TiXML* to XML* so with some #defines and a wrapper file you can provide your own XML* alias for any XML parsing library, like RapidXML.

I would be willing to do it myself, but I'm not very knowledgeable about XML so I would prefer to have some supervision and advice from you. Hope to hear from you soon.

Discussion

  • miguelbernadi

    miguelbernadi - 2011-08-04

    The attached patch (based on rev. 189) introduces CVarXML.h which typedefs the TinyXml objects to an independent name. This changeset is compilable and shouldn't be any difference in runtime. Nonetheless some other modifications in CMake should be made to support other XML providers.

    I may start to work on including RapidXML as alternative though I'm inexperienced and it may take some time. I'd like you to advise me in the coding style for the present changeset and any recommendations towards the following implementation would be welcome.

     
  • miguelbernadi

    miguelbernadi - 2011-08-04

    Abstracting TinyXml usage in the library