XML数据对于C像JAXB的Java绑定++ [英] XML data binding for C++ like JAXB for java
问题描述
我在数据的使用绑定和在C ++解析这个领域写这个问题作为一个完整的** **天真。所以,请多多包涵。 :)
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 . :)
您可能会发现这个问题,作为本
做谷歌搜索了一下后,我发现了什么C ++有类似的库到JAXB的Java对象再以code综合XSD形式的XML的presentation和增强序列化
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)现在我要问的是,可以通过升压序列化执行所有codeSynthesis是能够做到的功能呢?
1) Now what I want to ask is that can "Boost Serialization" perform all the functions that CodeSynthesis is able to do ?
2)如果是,其中它的一个会更好,如果我们考虑到使用
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)如果我们使用Java JAXB比较什么是它的性能? [可选问题...只是,如果有人有一个链接到基准]
3) What would be its performance if we compare with Java JAXB ? [Optional question...only if someone have a link to the benchmarks]
感谢。
推荐答案
回答第一个问题:没有!序列化是几乎总是数据绑定的一小部分。数据绑定为您提供了一个对象模型的具体以您的架构。这意味着你必须有一个模式来使用数据绑定。没有这样的需要XML序列化/ deserilization。选中此太: http://www.rpbourret.com/xml/XMLDataBinding.htm
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),就像比较苹果和桔子。至于易于使用而言,我会说数据绑定更好。
2) It is like comparing apples and oranges. As far as ease-of-use is concerned, I would say data binding is better.
3)此主题相关的外观: HTTP://lists.xml .ORG /档案馆/ XML的开发/ 200812 / msg00141.html
3) This thread looks relevant: http://lists.xml.org/archives/xml-dev/200812/msg00141.html
这篇关于XML数据对于C像JAXB的Java绑定++的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!