XML parsing error: XML or text declaration is not at the beginning of the entity

Source: Internet
Author: User

Recently in the modification of Discuz code for customers to use, encountered a problem is that BBS post management in Chrome and Firefox can not load the normal processing, only a layer of processing, and then there is no context.

Debugging discovery is a problem with XML. "XML declaration allowed only at the start of the document ..."

When you encounter an error that is usually an empty line at the beginning of the XML, start looking from the configuration file and delete the header and tail blank lines.

This piece of code is in the _header.html file under template.

</div> <% Else%> <%csharp%> response.clear (); Response.ContentType = "Text/xml"; Response.Expires = 0;      Response.Cache.SetNoStore (); <%/csharp%><br><?xml version= "1.0" encoding= "Utf-8"?> <root> <! [Cdata[<%/if%>

The default is the XML declaration content that is wrapped and written after <%/csharp%>, resulting in an error. Just need it. Declare the line break and the space deletion.

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.