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.