Re: [Boost-users] Boost XML Serialization
Hello All, Currently I am working on DB Driven C++ API, where it also involves XML processing functionalities. That's where I came across Boost Serialization. We have a very peculiar story here, and it goes like this: We have 2 identical APIs. One in C# and another in C++. Both are DB driven similar APIs. There are instances, where any XML data serialized on C++ platform needs to be de serialized on C# and vice versa. In C# life is straight forward; one needs no bothering about serialization and de serialization. I think in boost you can de serialize the XML document only if it is built using Boost Serialization. I think it is the case in C# also. Is there any way out, where Boost Serialization can be customized? Please forgive me if I am not clear in stating my problem statement! -------------------------------------------------------------------------------------------------- This email and any attachments are confidential and are for the use of the addressee only. If you are not the addressee, you must not use or disclose the contents to any other person. Please immediately notify the sender and delete the email. Statements and opinions expressed here may not represent those of the company. Email correspondence is monitored by the company. This information may be subject to export control regulation. You are obliged to comply with such regulations. Renishaw plc (company number 1106260) and Wotton Travel Limited (company number 01973158) are companies registered in England and Wales with a registered office at New Mills, Wotton-under-Edge, Gloucestershire, GL12 8JR, United Kingdom, Telephone +44 1453 524524. --------------------------------------------------------------------------------------------------
On Fri, Sep 19, 2014 at 5:17 AM, Manasi Deshpande
There are instances, where any XML data serialized on C++ platform needs to be de serialized on C# and vice versa. In C# life is straight forward; one needs no bothering about serialization and de serialization.
I think in boost you can de serialize the XML document only if it is built using Boost Serialization. I think it is the case in C# also.
This is my opinion only; others may have other views... I do not think Boost.Serialization is the right tool for your use case. The great thing about Boost.Serialization is that it allows you to focus on the design of your in-memory classes and, with minimal intrusion, allow saving/restoring them. Boost.Serialization determines the specific syntax of your serialization format, and it changes as your classes change. When you need to exchange data with other languages, though, I think you actually do need to go through the exercise of designing your XML documents and directly use an XML formatting/parsing library to read and write them. The code to do that will hopefully be somewhat similar between C++ and C#. Your question then becomes: what do Boost users recommend for an XML library? There is previous mailing-list traffic on that subject; you can search the archives. In addition, of course, the landscape of open-source libraries is continually changing. Good luck!
participants (2)
-
Manasi Deshpande
-
Nat Goodspeed