How do you declare a the “nbsp” entity in XML document

前端 未结 1 573
心在旅途
心在旅途 2021-01-16 03:46

I am getting the following error

The entity \"nbsp\" was referenced, but not declared.

I tried to declare the nbsp (shown below) in my XML file. But this isn

相关标签:
1条回答
  • 2021-01-16 04:15

    Put the DOCTYPE declaration before the root element start-tag. That is,

    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE html [
       <!ENTITY nbsp "&#160;">
    ]>
    <rss version="2.0"
      xmlns:content="http://purl.org/rss/1.0/modules/content/"
      xmlns:wfw="http://wellformedweb.org/CommentAPI/"
     >
     ...
    </rss>
    
    0 讨论(0)
提交回复
热议问题