XML 3: Will XML make our everyday lives easier?

Daily Newsletters

Sign up to ZDNet UK's daily newsletter.

NEWS
XML (eXtensible Markup Language) is a language that can be used to structure data in order to make it far easier to manipulate and exchange between applications. In order to fully understand XML we'll need to do a little history. In the mid-1980s a powerful and complex language called SGML (Standard Generalised Markup Language) was developed. All we need to know about SGML is that it is primarily used to define the structure of data in documents for a wide range of applications which require large amounts of data to be published in properly formatted documents (maintenance manuals for aircraft being a perfect example). SGML is what is known as a "meta-language" -- a language that could be used to define other languages, such as HTML (Hyper Text Markup Language). HTML is a very simple language that is used to define documents which will be published on the web. HTML simply consists of a limited number of tags that describe the way text and images should look in a web page. (For the purposes of this discussion, all angle brackets that would normally be used to make up both HTML and XML tags have been replaced with everyday curved brackets.)
  • Example HTML tags are:
(HTML) (/HTML) These tags go at the start of a text file to define it as a HTML document. (B) (/B) These tags denote that any text in between them should be displayed as bold. (CENTER) (/CENTER) These tags are used to display text or images in the centre of the screen. (IMG SRC="URL") This tag tells the browser to display an image file, the location of which is given as a URL inside the quotation marks. Now, HTML is fine if you simply want to display text and images on web pages, but it's dumb -- it just sees text and images but doesn't know the value of that data or how to manipulate it usefully. The current trend towards applications such as e-commerce means that we need something a little more flexible to help us manage the vast amount of data on the web. SGML might be useful, but it's a very large and unwieldy language and would be too complex for most applications. So, the various bodies and organisations which control such matters last year came up with XML which in essence is a subset of the SGML language. A system capable of reading SGML documents will be able to read XML documents, but not necessarily vice versa. It's better suited to use on the web than SGML and it's far more powerful than HTML. Rather than simply being a set of pre-defined tags that are processed by a web browser, XML allows people to develop their own sets of tags which can be used to describe data.
  • For example, a HTML page on a motor dealer's web page might look like this:
(HTML) (HEAD) (TITLE)Bernie's Motors(/TITLE) (/HEAD) (BODY) (/B)(/FONT) (P)Ford Mondeo, blue, 3000 miles only, £7500(/P)(/BODY) (/HTML)
  • A similar page written in XML might look something like this:
(CARSALE) (DEALER) (SHOP)Bernie's Motors(/SHOP) (LOCAL)London(/LOCAL) (TEL)0171 123 456(/TEL) (/DEALER) (CAR) (MFR)Ford(/MFR) (MOD)Mondeo(/MOD) (COL)Blue (/COL) (PRICE)£7500(/PRICE) (/CAR) (/CARSALE) As you can see, the XML page uses a set of tags that are specific to the car trade to carefully define each piece of information. The consequences of this for the end user are easy to imagine -- think how much easier it would be to locate a blue Mondeo for sale in the London area if the data is stored in XML rather than HTML. But this does raise a problem: For the given example to work effectively, the car industry would first have to agree to use the same set of tags and agree on a format for documents using those tags. To do this we have to create a schema, which is basically a set of rules that define how documents will work for specific applications, be they car sales or patient information files for medical purposes. Because XML allows us to create rigidly formatted data, it's perfect for use in applications where we want to process data automatically, such as online commerce. This however doesn't begin to scratch the surface of the possibilities raised by XML. The functionality of web based applications and the ease with which they can be implemented is greatly improved by XML. Combining content from heterogeneous data sources onto a single web page is much easier to do than in HTML, as is pumping out data to a wide range of devices such as web browsers, mobile phones, set top boxes and so on. The key idea behind XML is that it means when you put data onto the web, that data is formatted and described in such a way that it becomes easier to manage both for those who create it and those who want to access it. It's an exciting development for all web users because it will vastly improve the way the web works by structuring the vast amount of content in a much more useful manner. Have an opinion on XML? Tell the Mailroom Take me to the XML Special

Post your comment

In order to post a comment you need to be registered and logged in.

You can also log in with Facebook. Log in or create your ZDNet UK account below

  • Login

Will not be displayed with your comment

By signing up for this service, you indicate that you agree to our Terms and Conditions and have read and understood our Privacy Policy. Questions about membership? Find the answers in the Community FAQ

Get ZDNet UK's daily newsletter

Enter your email address to sign up

ZDNet UK Live

bordero

ike fuelband is great for every healthminded person ! to work out! theres this website called textme4free.com that you can use to text anywhere in...

16 minutes ago by bordero on Nike's FuelBand wristband gamifies exercise
BrownieBoy

> I'm told it's somewhat annoying when people have their Macs stolen > and Apple stores treat the thief as the owner, but there you go. Ouch,...

3 hours ago by BrownieBoy on AMD Ultrathins to challenge Intel Ultrabooks
Moley

@kevinmchapman. OK, I acknowledge that 'most' was a gratuitous throwaway comment as an afterthought and too presumptuous. As to proof, as you...

7 hours ago by Moley on A tale of two distros: Ubuntu and Linux Mint
Jack Schofield

@BrownieBoy > Works really well for thieves.... >> Nice attempt to deflect the argument by tossing in a point that's totally >> irrelevant, even...

8 hours ago by Jack Schofield on AMD Ultrathins to challenge Intel Ultrabooks
raskolnikof

fantastic that the so called piracy bills have been withdrawn. however, these anti-democracy supporters are still in the shadows so lets be alert...

9 hours ago by raskolnikof on SOPA, Protect IP support wavers in face of online protest
Tony Douglas

Please God no; teach them anything you like - thinking rationally, the uses and misuses of data, what data is and what it's not - but leave the...

11 hours ago by Tony Douglas via Facebook on Kids are the future. Teach ’em to code.
BrownieBoy

@Jack, > Works really well for thieves.... Nice attempt to deflect the argument by tossing in a point that's totally irrelevant, even it were...

1 day ago by BrownieBoy on AMD Ultrathins to challenge Intel Ultrabooks
bootlegger

Make that 13 people now - I got refused today at Manchester airport. I thought I was up to date on this legislation - I knew of the EU ruling from...

1 day ago by bootlegger on UK airport body scans will not be opt out
tinycg

Don't forget to check out apps like GoodReader or SlideShark either, they're indispensible for people on the go in presentation situations. Best...

1 day ago by tinycg on Four top iPad apps for people on the move
TerryRK

Well it seems there is something a number of us agree on. Why is the Ubuntu Unity launcher so ugly? I thought perhaps it was something to do with...

1 day ago by TerryRK on A tale of two distros: Ubuntu and Linux Mint
Freebies202

Duplicate comments are not made intentionally. Its very good to know that now you are keeping check on this problem because sometimes a commenter...

2 days ago by Freebies202 on Microsoft fixes blog comments, speeds up blogs with open source
kevinmchapman

"the very significant number of users" and "many (most) of us" - you have no evidence for these statements. It is a fact that most users are saying...

2 days ago by kevinmchapman on A tale of two distros: Ubuntu and Linux Mint
Marg Menzies Harrison

Another grammar faux pas is the improper use of "you". When sitting down down in a restaurant, for example, I get cringe when the waitress...

2 days ago by Marg Menzies Harrison via Facebook on 10 flagrant grammar mistakes that make you look stupid
zdnetukuser

And NOW, folks, for Canonical's next trick... Kubuntu is late. Here's a pencil. Draw your own conclusions. cf.:...

2 days ago by zdnetukuser on Linux Minterface
Moley

@kevinmchapman. The discussion here reflects the very significant number of users who really do like the traditional menu system and who wish to...

2 days ago by Moley on A tale of two distros: Ubuntu and Linux Mint
kevinmchapman

Er, no... It is an efficient means of finding the application/file/setting you need in one place. The icons are a simply a fallback for when you...

2 days ago by kevinmchapman on A tale of two distros: Ubuntu and Linux Mint
TerryRK

Isn't the provision of a text based search an admission by the developers that the mass of icons approach does not work? I don't need to use a...

3 days ago by TerryRK on A tale of two distros: Ubuntu and Linux Mint
kevinmchapman

"Unity and GNOME 3 both abandon the old text-based cascading menus in favour of a graphical icon-driven system." Point truly missed. Both use a...

3 days ago by kevinmchapman on A tale of two distros: Ubuntu and Linux Mint
TerryRK

whs001 - Thank you, I'm glad you liked the article. I absolutely agree with you on your first point. I should perhaps have made it clearer that...

3 days ago by TerryRK on A tale of two distros: Ubuntu and Linux Mint
Dennis Nilsson

If we allow corporate interest to dictate the way our government circumvents due process against foreign entities then we should accept the same...

3 days ago by Dennis Nilsson via Facebook on ACTA stumbles in Germany