C ++ parses XML to parse HTML

Source: Internet
Author: User

Recently, according to the instructor's requirements, I made a small file for parsing XML files, capturing HTML webpages, and parsing webpages.Program. But it took a week. There are many gains, and practice is the only criterion to test truth.

1. The first choice is C ++ (a familiar language ).Programming Language), The result shows that the open-source C ++ library is small.

2. There are still some C ++ libraries for parsing XML files. I used tinyxml at the beginning, which is very small and easy to use, but the biggest regret is that it does not support the wchar_t type. This is why I finally had to give up. The last use is rapidxml, which is based on the C ++ template. The interface type is similar to tinyxml. But the biggest highlight (I think) is that it supports wchar_t.

3. c ++ does not have an open-source HTML Parser library in windows. I am very disappointed with this. Fortunately, I just want to take some care of it and do not need to parse the entire HTML file into a DOM tree. Use the find function of wstring (string) to solve the problem. (The problem is far-fetched.)

4. The biggest feeling is that it is necessary to learn java. It is directed at so many open-source libraries.

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.