XML parser error: entity not defined
Posted: Sun Jul 01, 2012 5:35 pm
I wrote a simple XML file and a DTD file including an entity, but when I want to check it in my browsers I get the message:
XML parser error: entity not defined.
Address: file:///Users/Mike/Documents/fb.xml
Row 8, column 22
I tried to find an answer, most refer to an add-on problem with Firefox. I, however, get this message in Firefox, Chrome and Safari. (Opera doesn't give me a message, but it doesn't show the correct text replacement either.) I work on Mac OS X 10.7.
Here are my files.
DTD:
XML:
As the problem appears in all my browsers, I assume it is not a browser specific problem.
Thanks for your input.
XML parser error: entity not defined.
Address: file:///Users/Mike/Documents/fb.xml
Row 8, column 22
I tried to find an answer, most refer to an add-on problem with Firefox. I, however, get this message in Firefox, Chrome and Safari. (Opera doesn't give me a message, but it doesn't show the correct text replacement either.) I work on Mac OS X 10.7.
Here are my files.
DTD:
Code: Select all
<?xml version="1.0" encoding="UTF-8"?>
<!ELEMENT example (some_list) >
<!ELEMENT some_list (item+)>
<!ELEMENT item (element1, element2)>
<!ELEMENT element1 (#PCDATA) >
<!ELEMENT element2 (#PCDATA) >
<!ENTITY entity1 "1234567890" >
Code: Select all
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE some_list SYSTEM "Allgemeine_Entities.dtd">
<some_list>
<item>
<element1>Some Text</element1>
<element2>more Text and &entity1;</element2>
</item>
</some_list>
Thanks for your input.