How to resolve XML: Reference to the undefined object 'nbsp.

Source: Internet
Author: User

& Special characters in XML, & nbsp; will cause problems. Solution:

1.

Add a piece of code in XML, as shown below:

<! Doctype your_root_name [
<! Entity nbsp "">
<! Entity copy "">
<! Entity Reg "">
<! Entity trade "">
<! Entity mdash "-">
<! Entity ldquo "">
<! Entity rdquo "">
<! Entity pound "£">
<! Entity yen "¥">
<! Entity Euro "€">
]>

If & nbsp; appears in the generated HTML code, use the following:

Use <XSL: Text> </XSL: Text> to retain spaces. Note that the XSL type here is text. If it is other types, it will not work.

In addition, when the disable-output-escaping attribute is yes, escape output can be disabled, that is, direct output <, &, and other characters <XSL: text disable-output-escaping = "yes"> & amp; nbsp; </XSL: Text>

Or <XSL: Text disable-output-escaping = "yes"> <! [CDATA [& nbsp;]> </XSL: Text>

For more information, see W3C documentation.Http://www.w3.org/TR/html401/sgml/entities.html

2. Change "& nbsp;" to "& amp; nbsp.

"& Amp; nbsp;" indicates non-breaking space. It is not a built-in (built-in) object of XML. It is used in HTML, which is also defined in XHTML. It represents a space and instructs the browser not to interrupt (breaking, in fact, cannot wrap) here ).

 

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.