XML.com FAQs > C. Authors of SGML (including writers of HTML: Web page owners)
Question:  C.3 What does an XML document look like inside?

The basic structure is very similar to most other applications of SGML, including HTML. XML documents can be very simple, with no document type declaration (DTD), and straightforward nested markup of your own design:

<?xml version="1.0" standalone="yes"?>
  <greeting>Hello, world!</greeting>
  <response>Stop the planet, I want to get off!</response>

Or they can be more complicated, with a DTD specified (see the question on document types), and maybe an internal subset (local DTD changes in [square brackets]), and a more complex structure:

<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE titlepage SYSTEM "http://www.foo.bar/dtds/typo.dtd" 
[<!ENTITY % active.links "INCLUDE">]>
<titlepage id="BG12273624">
  <white-space type="vertical" amount="36"/>
  <title font="Baskerville" size="24/30"
         alignment="centered">Hello, world!</title>
  <white-space type="vertical" amount="12"/>
  <!-- In some copies the following decoration is 
       hand-colored, presumably by the author -->
  <image location="http://www.foo.bar/fleuron.eps" 
         type="URL" alignment="centered"/>
  <white-space type="vertical" amount="24"/>
  <author font="Baskerville" size="18/22" 
          style="italic">Vitam capias</author>
  <white-space type="vertical" class="filler"/>

Or they can be anywhere between: a lot will depend on how you want to define your document type (or whose you use) and what it will be used for.

This FAQ is from The XML FAQ, maintained by Peter Flynn