Error reading XML file with QT when program executes to if (!doc.setcontent (&file))

Source: Internet
Author: User

Look at Hoya's <QT creator Quick Start, and then follow the example of writing that Dom way to read an XML file out of this error.

At first everyone thought their path would be problematic, in fact, in the open before the time is not a problem, how can there be a problem in the back here? (I also have a lot of curved around here)

The other way to understand how this function works is to create a tree that stores XML-formatted data in a tree-like structure of Doc. That is, we made a mistake when we created the tree, and we could find out if our XML file was wrong by locating it.

For an XML, down the net, compare the discovery, originally the first line of <?xml Version = "1.0" encoding = "UTF-8"?> the question mark on both sides can not have spaces!

Error reading XML file with QT when program executes to if (!doc.setcontent (&file))

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.