Answers

Question and Answer:

  Home  XML

⟩ What does an XML document actually look like (inside)?

The basic structure of XML is similar to other applications of SGML, including HTML. The basic components can be seen in the following examples. An XML document starts with a Prolog:

1. The XML Declaration

which specifies that this is an XML document;

2. Optionally a Document Type Declaration

which identifies the type of document and says where the Document Type Description (DTD) is stored;

The Prolog is followed by the document instance:

1. A root element, which is the outermost (top level) element (start-tag plus end-tag) which encloses everything else: in the examples below the root elements are conversation and titlepage;

2. A structured mix of descriptive or prescriptive elements enclosing the character data content (text), and optionally any attributes (?name=value? pairs) inside some start-tags.

XML documents can be very simple, with straightforward nested markup of your own design:

 192 views

More Questions for you: