简体   繁体   中英

How to show/generate the special character “&” in xml file?

I have a spreadsheet like this:

在此处输入图片说明

It contains a special character "&". After I converted it to xml, it's rendered as an entity name 在此处输入图片说明 .

Here is the xml:

在此处输入图片说明

How to show/generate the special character "&" in xml file?

Thanks very much

You can't have the & sign in XML. It's not a properly formatted XML - that's why it's replaced with the & symbol.

Another option you have is using CDATA like this:

<![CDATA[SAILOR T&T]]>

There is a detail description of predefined entity of XML in http://www.w3schools.com/xml/xml_syntax.asp .

在此处输入图片说明

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM