在C ++中阅读配置xml文件 [英] Reading Configuration xml files in C++
本文介绍了在C ++中阅读配置xml文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
如何使用C ++读取以下配置文件。在STL中有任何支持。我不能使用其他第三方库。
How can the following configuration file be read in C++. Is there any support in STL. I can't afford to use other 3rd party libraries.
<?xml version="1.0" encoding="utf-8"?>
<appSettings>
<add key="FileType" value="doc"/>
<add key="FileLength" value="102234"/>
</appSettings>
我没有使用托管C ++。
I am not using managed C++.
推荐答案
STL不支持解析xml。如果你决定不使用第三方库,那么你唯一的另一个选择是用手写一个解析器,这似乎是一个很糟糕的主意。您为什么不能使用第三方库?
STL has no support for parsing xml. If you're determined not to use a third party library then your only other option is to write a parser by hand, this seems like a pretty bad idea. Why exactly can't you afford to use third party libraries?
这篇关于在C ++中阅读配置xml文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文