Introduction to XML
Computing Resources >> Tutorials >> Web Development >> Introduction to XML  


What does XML look like?

Let’s look at some examples of XML text:

<?xml version="1.0" encoding="ISO-8859-1"?>
<body>Don't forget me this weekend!</body>

The first line in the document - the XML declaration - defines the XML version and the character encoding used in the document. In this case, the document conforms to the 1.0 specification of XML and uses the ISO-8859-1 (Latin-1/West European) character set. Note that there is no closing tag for this declaration. Unlike most elements of an XML document, the declaration does not require a closing tag.

The next line describes the root element of the document (as if it were saying,"this document is a letter"). Note that this element has a closing tag.

The next four lines describe four child elements of the root (to, from, greeting, and body). Note that all of these elements also have closing tags.

next section>


Watch the video
choose format/speed
real media dial-up | broadband

Tutorial Transcript

© 2003 Andrew Loomis| iSchool | UT Austin | webmaster