XML equal sign error

Source: Internet
Author: User

When reading XML with C,ProgramError reported"=" Is an unexpected flag and should be ";"

Locate row number content: http://www.starwoodhotels.com/westin/search/results/city_advanced.htmllocaleCode=zh_CN&skinCode=SI&city=&stateProvince=&country=CN&language=zh_CN

At first, I thought it was the reason for the equal sign. Then I searched for the reason as follows:

In XML&Some special tags cannot be used directly. They must be escaped, even if they are not in the attribute value. 

Solution:& Replace:& Amp; 

It says the reason for the equal sign problem is
When the XML interpreter encounters all &, it starts to omit a symbol and finds one; the content in the middle represents the escape character. Because the = is not found at the location where the; is to be found, it prompts that the equal sign is incorrect.

For example, & lt; indicates < 

 

Reference: http://topic.csdn.net/u/20080925/14/fa98d1e8-571c-4023-bcf6-2b0f38f12e96.html

Http://www.cnblogs.com/anjou/archive/2007/03/15/676476.html 

When reading XML with C #, the program reports an error"=" Is an unexpected flag and should be ";"

Locate row number content: http://www.starwoodhotels.com/westin/search/results/city_advanced.htmllocaleCode=zh_CN&skinCode=SI&city=&stateProvince=&country=CN&language=zh_CN

At first, I thought it was the reason for the equal sign. Then I searched for the reason as follows:

In XML&Some special tags cannot be used directly. They must be escaped, even if they are not in the attribute value. 

Solution:& Replace:& Amp; 

It says the reason for the equal sign problem is
When the XML interpreter encounters all &, it starts to omit a symbol and finds one; the content in the middle represents the escape character. Because the = is not found at the location where the; is to be found, it prompts that the equal sign is incorrect.

For example, & lt; indicates < 

 

Reference: http://topic.csdn.net/u/20080925/14/fa98d1e8-571c-4023-bcf6-2b0f38f12e96.html

Http://www.cnblogs.com/anjou/archive/2007/03/15/676476.html 

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.