View Single Post
Old 11-20-2012, 05:09 AM   PM User | #1
TheAliveWinner
New Coder

 
Join Date: Feb 2012
Location: Bokaro Steel City, India
Posts: 18
Thanks: 11
Thanked 1 Time in 1 Post
TheAliveWinner is an unknown quantity at this point
Exclamation Referencing external entity!

Hello friends,
I am trying to reference entity from an external dtd.
But the XML code is not being parsed due to error.

"I am really stuck and I don't know what to do."

XML file (note.xml):
Code:
<?xml version="1.0" standalone="no"?>
<!DOCTYPE message SYSTEM "note.dtd">
<message>
    <to>Love</to>
    <from>&author; Lover</from>
    <body>I love you very much! &lt;3</body>
</message>
DTD file (note.dtd):
Code:
<!ELEMENT message (to, from, body)>
<!ELEMENT to (#PCDATA)>
<!ELEMENT from (#PCDATA)>
<!ELEMENT body (#PCDATA)>
<!ENTITY author "Anonymous">
Thank you!
__________________
Quote:
"It will never rain roses: when we want to have more roses, we must plant more roses."
- George Eliot
TheAliveWinner is offline   Reply With Quote