2

I am writing this question as a complete **naive** in this field of "Use of data binding and parsing in c++". So, please bear with me . :)

You may find this question as duplicate of THIS

After doing a bit of googling I found that what C++ has similar library to JAXB for java for object representation of an XML in the form of "Code Synthesis xsd" and "Boost Serialization"

1) Now what I want to ask is that can "Boost Serialization" perform all the functions that CodeSynthesis is able to do ?

2) If yes, which one of it would be better to use if we take into account

 1) Dependency   2) Performance   3) Ease of use 

3) What would be its performance if we compare with Java JAXB ? [Optional question...only if someone have a link to the benchmarks]

Thanks.

Community
  • 1
  • 1
Arunmu
  • 6,837
  • 1
  • 24
  • 46
  • 1
    Note: serialization is **not** the same as data binding or code synthesis. Serialization is for saving the state of objects to some file format, and then loading that file later, recreating those objects. Serialization is _not_ for loading some file format and generating objects from it. It only works from files saved by the serializer itself. – Nicol Bolas Aug 11 '11 at 00:00
  • hmmm...thought so, but included in the question as the linked question mentioned about it. Thanks. – Arunmu Aug 11 '11 at 03:32

1 Answers1

1

Answer to the first question: No! Serialization is almost always a small subset of data-binding. Data binding gives you an object model specific to your schema. That means you have to have a schema to use data-binding. No such need for XML serialization/deserilization. Check this too: http://www.rpbourret.com/xml/XMLDataBinding.htm

2) It is like comparing apples and oranges. As far as ease-of-use is concerned, I would say data binding is better.

3) This thread looks relevant: http://lists.xml.org/archives/xml-dev/200812/msg00141.html

Sumant
  • 4,286
  • 1
  • 23
  • 31