mohan
mohan

Reputation: 1

Why am I getting this error in XML file?

I am wrtting an XML file in Java

XML Parsing Error: undefined entity
Location: file:///home/Desktop/desk.xml
Line Number 13, Column 13:<a>example &raquo; FEEDBACK</a>
------------^

Why does it say &raquo; is an undefined entity?

Upvotes: 0

Views: 1483

Answers (2)

PawanS
PawanS

Reputation: 7193

Reason: &raquo is a element of XSLT2.0 stylesheet...

solution 1:

Replace your xml entity &raquo; with the numeric entity &#187;

OR

Solution 2:

If you want the output document to contain the named HTML entity &raquo; rather than the numeric reference, add the following elements to your stylesheet (XSLT2.0 only)

Upvotes: 0

Arne Burmeister
Arne Burmeister

Reputation: 20614

Does your XML have any schema? The schema has to define the entity. XML has only a few entities out of the box:

  • & amp
  • ' apos
  • " quot
  • > gt
  • < lt

All other are from a schema like XHTML.

Upvotes: 2

Related Questions