Entity not defined

The document uses a named entity, like  , that XML does not know.

The message, as the validator reports it
Entity 'nbsp' not defined

Why it happens

  • HTML entities copied into XML:  , ©, é, —… XML defines only five: <, >, &, " and '.
  • An entity declared in a DTD that is not loaded.

How to fix it

Replace the entity with the character itself (the document is UTF-8 by default), or with a numeric reference:   for a non-breaking space, © for ©. If the entity belongs to a DTD, declare that DTD in the document.

Example

Reports the error
<p>Price:&nbsp;10</p>
Fixed
<p>Price:&#160;10</p>