XML Declaration and the DTD

XML Declaration

<?xml version="1.0" encoding="ISO-8859-1"?>

The above code is the XML declaration. It should be the first line of the document and, for this course, should be exactly as above. It just specieifes the XML version and the types of characters used in the document.

DTD: Document Type Definition

<!DOCTYPE html PUBLIC
      "-//W3C//DTD XHTML 1.0 Transitional//EN"
      "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

The above code is the XML DTD. It should follow the XML declaration and be as above. Generally, you just want to copy the skeleton or take it from one of your other webpages.



Back to Knowledge Dump