Question: What does an XML document actually look like (inside)?Answer: 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. |
Is it helpful?
Yes
No
Most helpful rated by users:
- What is XML?
- What is a markup language?
- Describe the differences between XML and HTML?
- Can you walk us through the steps necessary to parse XML documents?
- Where should I use XML?