Xml cannot be displayed. The data at the root level is invalid. There are 1st rows, location 1, and xml 1st rows.

Source: Internet
Author: User

Xml cannot be displayed. The data at the root level is invalid. There are 1st rows, location 1, and xml 1st rows.


This is usually because xml is faulty. There are many ways to modify it on the Internet. Here, xml is returned through webservice, this prompt is certainly because the service is faulty. One reason is that the xml returned after the web Service is changed is encoded. in C #, UrlDecode can be used for anti-encoding to solve this problem, you need to add system. web reference, and then temp = HttpUtility. urlDecode (temp, Encoding. UTF8); temp is the returned xml. Here it is in string format, and UTF8 is the encoding. Solution!

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.