RU beehive logo ITEC dept promo banner
ITEC 325
2018fall
ibarland

XML
what is it?

Course Overview

where we’ve been; where we’re going

In my mind, here's what we've talked about so far:

The remainder of the lectures are about XML


XML

What is XML?

In the 80s, SGML was an obscure markup language; Tim Berners-Lee based HTML on it in 1990, which by the mid-90s was widely known. But because early browsers, trying to get market share, all worked hard to make sense of ill-formed HTML pages (tag soup), which in turn led people to learn and write bad HTML, the standardization process came to allow all sorts of awful shortcuts (e.g. you don't need to put attributes in quotes, or close your p tags, etc.).

In reaction to the sorry state of HTML, XML was a reiteration (and narrowing) of SGML.

As always: for your web pages, I recommend using all XML conventions when writing your HTML5. Even though you technically don't need to (say) close your p tags in HTML5, the XML requirements are all good ones which help clean data and interoperability.

Examples of XML documents

Here are some specific examples:

As an aside: vector graphics vs. bitmap graphics: What are pros and cons of each? For sound, compare: Beethoven's Fifth on piano, vs. midi-with-simple-tones (or midi-with-good-tones) There are also fusions of the two (rather, vectorgraphics where bitmaps are one primitive): E.g. badger-badger-badger.swf.

Keeping data in XML format has several nice properties:

  1. It's a string-format which easily represents hierarchical information.
  2. It's human-readable (compared with a proprietary binary format often used otherwise).
  3. There are many nice tools for working with it: If you make your own information and store it as XML, you get all these tools and libraries for free.
  4. You have a default format for serializing your information.
It's worth noting that other formats also achieve this — notably, json (reasonable), and yaml (not preferred — too many surprising exceptions).


1 Although XML only became widespread in the 90s, old Lispers (1965) will look and say
You use the equivalent of S-expressions? Yes, of course they're an awesome data format!
Requring a tag at the start of every list? Sure, that's often appropriate.
Repeat the tag at the end of every list? Well, that's sure redundant!
     
2 Don't try editing the file w/o make a copy of the file and probably the .itl (real library file) as well.      

logo for creative commons by-attribution license
This page licensed CC-BY 4.0 Ian Barland
Page last generated
Please mail any suggestions
(incl. typos, broken links)
to ibarlandradford.edu
Rendered by Racket.