Introduction to XML

You may already be familiar with the HyperText Markup L anguage (HTML) which is used by Web developers to instruct browsers on how to display Web pages. For example, when the following HTML code is saved as a text file with an .html (or .htm) extension, any Web browser can recognize the file and display its markup. In this case, a browser displays the message HELLO WORLD! on a white background as shown in Figure 8.2.

<TITLE>Basic HTML Document</TITLE> </HEAD>

<BODY BGCOLOR=WHITE>

<P>HELLO WORLD!</P> </BODY> </HTML>

Document title

Document body'

Document title

Document body'

A basic HTML document.

A basic HTML document.

HTML uses predefined tags enclosed in angle brackets (< >) to identify different formatting elements of a document. You don't really have to know HTML to identify the purpose of the tags in the previous document. For example, <TITLE> </TITLE> defines the title of the document and <BODY> </BODY> defines that part of the document displayed in the browser window (see Figure 8.2). You will note that the tags do not appear in the Web browser window. Of course, that is the purpose of HTML—to use tags to mark up how a document should appear in a browser window without showing the markup language.

In addition to the few tags I've shown here, there are many more HTML tags for marking up how a Web document is displayed; however, it's not this book's purpose to teach you HTML. Instead, I suggest consulting some of the numerous Web tutorials or available books if you are interested in learning HTML.

XML is another markup language with similarities to HTML, but with an entirely different purpose. In the next few sections, I will define and describe what it takes to create a basic XML document.

Biorhythm Awareness

Biorhythm Awareness

Who else wants to take advantage of biorhythm awareness to avoid premature death, escape life threatening diseases, eliminate most of your life altering mistakes and banish catastrophic events from your life.

Get My Free Ebook


Post a comment