如何在C/C ++中读取/写入Xml文件? [英] How to read/write Xml File in C/C++?
本文介绍了如何在C/C ++中读取/写入Xml文件?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我需要知道如何用纯C ++或C读写Xml文件. I need to know how to read and write Xml files in pure C++ or C.
我不能使用任何.Net库,而在Visual Studio 2010中使用空白的Win32 C ++项目.
如果可能的话,我不想使用任何第三方工具/代码. .com/en-us/library/windows/desktop/ms763742(v = vs.85).aspx> MSXML [
I can''t use any .Net libraries and I''m using a blank Win32 C++ Project in Visual Studio 2010.
If possible I''d like to not use any 3rd party tools/code. 解决方案 Have a look at MSXML[^]
The header file is included with the Windows SDK:
#include <MsXml.h>
Best regards
Espen Harlinn
If you don''t need xml validation (dtd, xsl, ...), xml namespaces and similar fancy stuff I would recommend using tinyxml that is hassle free to put into a c++ program and is platform independent.(we use it on win32, linux, android, iOS, ...). Its a very popular "simple drop-in" library.
这篇关于如何在C/C ++中读取/写入Xml文件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文