XML Tutorial
Xml is abbreviated for " Extensible Markup Language"
Prerequisite: Familiarize yourself with Html before learning Xml.
Why using xml:
-
xml can easily be read by anyone including novices, so readiblity is one of key
element of xml.
-
you can use any editor to create xml page, no software is needed at all,
interoparibility is another key advantage of using xml.
-
Easy to edit and add information to your xml page, it save alot of time doing
it and editibility is easily handaled.
Html Vs Xml:
| Html Code |
| <h1>Rhubarb Cobbler</h1>
<h2>Maggie.Herrick@bbs.mhv.net</h2>
<h3>Wed, 14 Jun 95</h3>
Rhubarb Cobbler made with bananas as the main sweetener.
It was delicious. Basicly it was
<table>
<tr><td> 2 1/2 cups diced rhubarb</td>
<tr><td> 2 tablespoons sugar</td>
<tr><td> 2 fairly ripe bananas</td>
<tr><td> 1/4 teaspoon cinnamon</td>
<tr><td> dash of nutmeg</td>
</table>
Combine all and use as cobbler, pie, or crisp.
Related recipes: <a href="#GardenQuiche">Garden Quiche</a> |
| Corresponding XMl Code |
|
<recipe id="117" category="dessert">
<title>Rhubarb Cobbler</title>
<author><email>Maggie.Herrick@bbs.mhv.net</email>
</author>
<date>Wed, 14 Jun 95</date>
<description>
Rhubarb Cobbler made with bananas as the main
sweetener. It was delicious.
</description>
<ingredients>
<item><amount>
2 1/2 cups</amount><type>diced rhubarb</type></item>
<item><amount>
2 tablespoons</amount><type>sugar</type></item>
<item><amount>
2</amount><type>fairly ripe bananas</type></item>
<item><amount>
1/4 teaspoon</amount><type>cinnamon</type></item>
<item><amount>
dash of</amount><type>nutmeg</type></item>
</ingredients>
<preparation>
Combine all and use as cobbler, pie, or crisp.
</preparation>
<related url="#GardenQuiche">Garden Quiche</related>
</recipe>
|
|
Looking at the html and xml code, you can see that the xml page can easily be
read and edit, and those are the key advantages in using xml language, Next
week, we will go more in depth of using xml in the web service.
|
Preview the xml file
|
|