Example of non well-formed XML comments

<earth>       <country>Canada</<!--Contains information on countries-->country> </earth>

Example of well-formed XML entities

<myPocket>"There is &lt; 10 rupees in my pocket"</ myPocket> Output: <myPocket>"There is < 10 rupees in my pocket&...

Example of well-formed XML references

Greek letter Omega is represented as &Omega;

Example of using external DTD in XML document

<?xml version="1.0"?> <!DOCTYPE earth SYSTEM "ea...

Example of using inline DTD in XML document

<!DOCTYPE message[ -> Root element of the document is &ldquo;m...

Example of a valid XML document

<?xml version="1.0"?> <!DOCTYPE greeting <!ELEMENT...

Example of an invalid XML document

<?xml version="1.0"?> <!DOCTYPE WISHES <!ELEMENT W...

Example with internal DTD in XML

<?xml version="1.0" standalone="yes"?> <!DOCTYPE GAME [ <!ELEMENT GAME (team1, team2, score)> <!E...

Example with external private DTD in XML

<?xml version="1.0" standalone="no"?> <!DOCTYPE GAME SYSTEM "Game.dtd"> <GAME>  &n...

Example with external public DTD in XML

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