Libxml2 is the XML C parser and toolkit developed for the Gnome project (but usable outside of the Gnome platform), it is free software available under the MIT License. We can use it to read/write data from XML data file.
Steps to use Libxml2 library is as follows:
Steps to use Libxml2 library is as follows:
- Download 3 packages from GnuWin (Libxml2,zlib and iconv) and intall it to anywhere on your PC.Note: all should be Win32-version. the appendix is _win32
- In VC++ project:
- Add path <Libxml2 root>/include to VC++ Include Directories.
- Add path <iconvroot>/include to VC++ Include Directories.
- Add path <zilb root>/include to VC++ Include Directories.
- Add path <Libxml2 root>/lib to VC++ Library Directories.
- Add path <iconv root>/lib to VC++ Library Directories.
- Add path <zilb root>/lib to VC++ Include Directories.
- Add iconv.lib and libxml2.lib to Project Linker Input Additional Dependencies.
- Copy libxml2.dll under path <Libxml2 root>/bin to project folder.
- Copy iconv.dll and zlib1.dll to project folder.
- Do like project to read/write data from/to XML files.
本文介绍如何使用Libxml2库读写XML数据文件,并提供了详细步骤及注意事项。包括下载安装所需库,配置环境变量,以及如何在Visual C++项目中集成并使用Libxml2进行实际操作。

被折叠的 条评论
为什么被折叠?



