What is XML?

XML is method of storing data, togther with tags to explain what it means, and all in plain text. An example of XML is HTML (text with tags explaining how it should be displayed).

XML is useful for several reasons.

Not very hard really - sometimes the best ideas are the simple ones!

The easiest way of explaining it is to show an example.

<?xml version="1.0" encoding="ISO-8859-1"?>
<document>
  <title>Walking Book</title>
  <version>2003/11/11 11:55</version>
  <chapters>
  <chapter number="1">
    <name>Henley (round walk)</name>
    <top_10 type="html"></top_10>
    <travel type="html">car</travel>
    <updates>
      <summary type="html">No major changes</summary>
      <update>
        <book>red</book> 
        <date></date> 
        <page></page> 
        <place></place>
        <change>Just below point [8] page 19, there is no road hump sign
        down the turning you take.</change>
      </update>
      <update>
        <book>red</book> 
        <date></date> 
        <page>24</page> 
        <place>col 2</place>
        <change>Line 3. Should read 70 degrees, not 250 degrees 
        (correction from Hannah Moss).</change>
      </update>
      <update>
        <book>blue</book> 
        <date>Jan-03</date> 
        <page></page> 
        <place></place>
        <change>The footpath from Henley-on-Thames is flooded. 
        It is not therefore currently possible to do this walk. It may be practicable 
        to do the end of the walk backwards (given a map) as far as lunch the 
        Walnut Tree or in Hambleden - returning by the same route.</change>
      </update>
      <update>
        <book>blue</book> 
        <date>Jan-02</date> 
        <page>18</page> 
        <place>lunch</place>
        <change>The Walnut Tree at Fawley Green is under new management.</change>
      </update>
    </chapter>
  </chapters>
</document>

© 2005 Andrew Murphy • All Rights Reserved