Action against software patentsGnome2 LogoW3C LogoRed Hat Logo
Made with Libxml2 Logo

The XML C parser and toolkit of Gnome

XML

Main Menu
Related links

XML is astandardformarkup-based structured documents. Here is an example XMLdocument:

<?xml version="1.0"?>
<EXAMPLE prop1="gnome is great" prop2="&amp; linux too">
  <head>
   <title>Welcome to Gnome</title>
  </head>
  <chapter>
   <title>The Linux adventure</title>
   <p>bla bla bla ...</p>
   <image href="linus.gif"/>
   <p>...</p>
  </chapter>
</EXAMPLE>

The first line specifies that it is an XML document and givesusefulinformation about its encoding. Then the rest of the document is atextformat whose structure is specified by tags between brackets.Eachtag opened has to be closed. XML is pedantic about this.However, ifa tag is empty (no content), a single tag can serve as both theopening andclosing tag if it ends with />rather thanwith>. Note that, for example, the image tag has no content(justan attribute) and is closed by ending the tag with/>.

XML can be applied successfully to a wide range of tasks, ranging fromlongterm structured document maintenance (where it follows the steps ofSGML) tosimple data encoding mechanisms like configuration file formatting(glade),spreadsheets (gnumeric), or even shorter lived documents such asWebDAV whereit is used to encode remote calls between a client and aserver.

Daniel Veillard