什么是最常用的C ++的XML库? [英] What's the most commonly used XML library for C++?

查看:113
本文介绍了什么是最常用的C ++的XML库?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我通过快速的Google搜索查看了一些图书馆。一般来说,C ++最常用的XML实现是什么?

I saw a few libraries through a quick Google search. What's generally the most commonly used XML implementation for C++?

我计划使用XML作为程序配置的手段。我喜欢XML,因为我会使用它的树状结构。如果你认为你有一个更适合的解决方案,请随时提及它。我想要轻量级和简单的东西。也许XML是太多了?

I'm planning on using XML as a means for program configuration. I liked XML because I'll be making use of its tree-like structure. If you think you have a more suitable solution for this, feel free to mention it. I want something lightweight and simple. Maybe XML is too much?

编辑:跨平台将是更可取的,但是回答一个问题,我在Linux中编程这个。

Cross-platform would be preferable, but to answer a question, I'm programming this in Linux.

推荐答案

我建议不要使用XML。

I would recommend not using XML.

我知道这是一个意见的问题, XML真的用很多标签来掩盖信息。此外,即使它是人类可读的,杂乱实际上妨碍可读性(和我说它从经验,因为我们目前有134个XML配置文件)。此外,由于属性和纯文本之间的混合,它很难阅读。

I know this is a matter of opinion but XML really clutters the information with a lot of tags. Also, even though it is human-readable, the clutter actually hampers readability (and I say it from experience since we have some 134 XML configuration files at the moment...). Furthermore, it is quite difficult to read because of the mix between attributes and plain-text. You never know which one you are going to need.

我建议使用JSON,如果你想要一个语言已经有明确定义的解析器。

I would recommend using JSON, if you want a language that already has well-defined parsers.

对于解析,可以简单地查看 json.org ,并且有一个长列表的C ++库。

For parsing, a simple look at json.org and you have a long list of C++ libraries.

这篇关于什么是最常用的C ++的XML库?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆