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:
- Download GnuWin (note that currently GnuWin is only for win32, for win64, we can simply copy installed files in win32 to win64 system, it did work :)) and intall it to anywhere on your PC.
- Download Libxml2 and extract it to anywhere on your PC.
- In VC++ project:
- Add path
<Libxml2 root>/include
to VC++ Include Directories. - Add path
<GnuWin root>/include
to VC++ Include Directories. - Add path
<Libxml2 root>/lib
to VC++ Library Directories. - Add path
<GnuWin root>/lib
to VC++ Library Directories. - Add
libiconv.lib
andlibxml2.lib
to Project Linker Input Additional Dependencies. - Copy
libxml2.dll
under path<Libxml2 root>/bin
to project folder. - Copy
iconv.dll
andzlib1.dll
to project folder.
- Add path
- Do like project to read/write data from/to XML files.