I'm unable to link XML and DTD, when I validate I keep getting a DOCTYPE error as said in question, also when I saved as an xml and click it into a browser, its just blank.
I validated my XML earlier and it was fine (have done a few changes since then), but I cannot get my head around why the DTD is not working with my XML.
Validating, trying new doctype commands, researching to find a solution.
header ("Content-Type:text/xml");
<!DOCTYPE [
<!ELEMENT restaurantdetails (cuisine,name,logo,foodpicture,URL,address,location,takeaway,dinein,ph,openhours,delivery,description)
<!ATTLIST cuisine type CDATA #REQUIRED>
<!ELEMENT name (#PCDATA)>
<!ELEMENT logo (#PCDATA)>
<!ELEMENT foodpicture (#PCDATA)>
<!ELEMENT URL (#PCDATA)>
<!ELEMENT address (#PCDATA)>
<!ELEMENT location (#PCDATA)>
<!ELEMENT takeaway (#PCDATA)>
<!ELEMENT dinein (#PCDATA)>
<!ELEMENT ph (#PCDATA)>
]>
<pre>
<restaurantdetails>
<cuisines>
<Asian>
<b>
<name>Name: Wok N Roll</name>
<logo>
<img src="Graphics/woknroll.png" alt="Stalactites" width="300" height="300">
</logo>
<foodpicture>
<img src="Graphics/wokfood.jpg" alt="Stalactites" width="600" height="400">
</foodpicture>
<URL>URL: https://www.stockland.com.au/shopping-centres/centres/stockland-green-hills/stores/wok-n-roll</URL>
<address>Address: 1 Molly Morgan Drive, Stockland</address>
<location>Location: East Maitland</location>
<takeaway>Takeway: Yes</takeaway>
<dinein>Dine-in: Yes</dinein>
<ph>Phone: 49336589</ph>
<openhours>Open Hours:</openhours>
<openhoursmonday>Monday=9am-
530pm</openhoursmonday>
<openhourstuesday>Tuesday=9am-530pm</openhourstuesday>
<openhourswednesday>Wednesday=9am-530pm</openhourswednesday>
<openhoursthursday>Thursday=9am-9pm</openhoursthursday>
<openhoursfriday>Friday=9am-530pm</openhoursfriday>
<openhourssaturday>Saturday=9am-5pm</openhourssaturday>
<openhourssunday>Sunday=10am-4pm</openhourssunday>
<openhours></openhours>
<delivery>Delivery: Yes</delivery>
<minimumspend>Minimum spend for delivery: $34</minimumspend>
<deliveryfee>Delivery Fee: $10</deliveryfee>
<description>Description: Wok N Roll offers authentic Chinese food prepared and cooked on site daily. Using the
freshest ingredients to create delicious meals available for takeaway or dining in. Served with your choice of
noodles or rice a meal from Wok N Roll is a delicious choice for lunch or dinner. Fresh handmade sushi is also
available.</description>
</b>
</cuisines>
</restaurantdetails>
</pre>
To be able to open it as an XML and display what is written in the code instead of having to open it as a HTML.