C ++ XML programming experience-libxml2 library user guide (Part 1)

Source: Internet
Author: User

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
Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.