C ++ XML programming experience-libxml2 library user guide
The reasons for writing this article are as follows: 1) There is no XML method in the C ++ standard library, and you must be familiar with a function library when operating XML files in C ++, libxml2 is one of the excellent XML libraries, and it supports multiple programming languages at the same time; 2) the tutorial of libxml2 library is not well written, especially for encoding and conversion, it is not applicable to the conversion of Chinese encoding. 3) most of the information about libxml2 on the Internet is only the translation of its own documents. It does not detail how to program on the Windows platform, I seldom mention how to solve Chinese problems.
Based on the above reasons, I decided to write an XML document in the C/C ++ language on the Windows platform using the libxml2 library, documentation that uses the iconv library for Chinese encoding conversion. Makefile, XPath, and other related content are also involved. All the source code in this article is at http://www.blogjava.net/files/wxb_nudt/xml_src.rar.
Libxml2 is a C-language XML library that provides easy and convenient operations on XML documents, and supports XPath query and some XSLT conversion functions. The libxml2 version is http://xmlsoft.org/. the full version of the library is open source, along with examples and instructions. It is best to download this library first, because you can view the documents and examples.
Windows is compatible. .
While programming, we use Windows Version libxml2, zlib, and iconv to decompress it to a specified folder, such as D: "libxml2-2.6.30.win32, D:" zlib-1.2.3.win32, and D: "iconv-1.9.2.win32. In fact, we know that using header files, library files, and DLL in Windows does not require installation, and it does not use any components or databases that need to be registered, you only need to tell the compiler and the linker where these resources are located.
From: http://www.blogjava.net/wxb_nudt/archive/2007/11/18/161340.html