C++ Object to XML for communication

TakiraJanaka

New Member
I'm looking for a simple-way to transform in C++ an object into XML string representation, so this way I could communicate with a server.For instance, let us say I have an object:\[code\]class A{ string data1; string data2; string dataN; list<B> bList;}class B{ string moreData;}\[/code\]I would like the following XML-representation:(Assume that I have created one instance A and it has two instances of B)\[code\]<A> <data1>content</data1> <data2>content</data2> <dataN>content</dataN> <B> <moreData>content</moreData> </B> <B> <moreData>content</moreData> </B></A>\[/code\]
 
Back
Top