tinyxml2 icon indicating copy to clipboard operation
tinyxml2 copied to clipboard

Unclear convertion TinyXML1 to TinyXML2

Open alphaonex86 opened this issue 8 years ago • 4 comments

Hello,

Can you write a guide to convert TinyXML1 to TinyXML2? It's very important if you wish deprecated the TinyXML1. I'm blocked on https://github.com/alphaonex86/CatchChallenger/blob/version-2/server/base/TinyXMLSettings.cpp line 28,29,60,61,100,102 My macro for the dual compatibility is here: https://github.com/alphaonex86/CatchChallenger/blob/version-2/general/base/GeneralVariable.h

Cheers,

alphaonex86 avatar Jun 02 '16 14:06 alphaonex86

@alphaonex86 it's a great request; I regret not writing that long ago when it was fresh in my mind. A couple people have mentioned posting some docs and I hope they will.

I don't generally recommend a macro unless you really need both versions. There are some differences (in iteration, stdio support) that are hard to abstract.

leethomason avatar Jun 03 '16 14:06 leethomason

Then you are into a good position to start from near 0 to understand what a beginer see.

I plan have support of tinyXML 1, 2 and pugixml, then the macro is usefull. Not class, yes... I can't cut the support of version 1 util I have a full version 2 working and test with my data set against pugixml too.

alphaonex86 avatar Jun 03 '16 21:06 alphaonex86

I have long forgotten how TinyXML-1 works.

leethomason avatar Jun 03 '16 22:06 leethomason

...at least to the level of being able to write an insightful migration guide.

leethomason avatar Jun 03 '16 22:06 leethomason