88 Raver Croft Drive
Chattanooga, TN 37403
Tel: 1-423-665-9085
Beginner's Guide to XML Files

I can't even imagine an online world without HTML files! And, to a certain degree, it would be almost impossible to build one.

However, HTML is quite limited. Sure, it works fine when it comes to basic web documents, but things don't work that well when people try to use it for things that go way beyond its capabilities.

Take data exchange, for example. Building a data system using HTML is just like trying to build a car using soda cans. It's possible to do that, of course, but the end result will be ugly and won't have all the needed features and options.

People have recently started to use CSS to bypass the HTML limitations, but XML has been a solid choice way before CSS' invention.

XML is easy to understand and use. It's a metalanguage, a simple programming language that can be used to create components that are tailored for a specific application.
Some people think that it is too easy to use, so they don't consider it to be a programming language ;)

There's always been a love affair between XML and Java, because the duo allows people with limited programming experience to turn an Internet-only application into a fully-fledged desktop application. By using XML and Java, you can grab and use web-based data in pretty much any piece of desktop software.

How is this possible? XML and Java are extensible through document type definitions (DTD) and class loaders.

I am sure that we can all agree on this: HTML isn't a flexible, extensible programming language. It is okay if you're only interested in displaying some data on the screen, but we all know that it is display-centric, and thus very limited.

XML allows developers to create their own tags. And the resulting code is easily readable - here's an example.
The code needs a parser, a piece of software that is able to read XML and create a tree-like document structure that is populated with the data. And if your code is properly formatted, the parser will be able to create the needed tree structure even if the actual data doesn't have any logic behind it.

This could cause problems for some applications, of course. Fortunately, people have also invented validating parsers, which are able to read XML files and verify if the documents tags are valid, if the attributes are okay, and so on.

Here are the top benefits that arise from using XML:

1. XML is much more flexible in comparison with HTML.
2. XML produces cleaner code, which is much easier to read in comparison with HTML.
3. XML stores data, rather than information on how to use it. It's one of the best databases for the World Wide Web, if you will.
4. XML is easy to debug, because a validating parser can catch most of the errors for you. And the good news is that many high-quality parsers can be downloaded for free.
5. CSS can be used to style both HTML and XML. Anytime you change the stylesheet, the XML data is automatically and properly formatted - isn't that cool?

When it is used in conjunction with HTML, XML helps people style their web documents in an easy, consistent way. Since both technologies are supported by all modern browsers, it is easy to maintain multi-browser compatibility.

The document object model (DOM) allows people to use XML to exchange data on the Internet, and yes, even exchange data between applications! To give you an example, you could represent a database as a collection of DOM objects, and then write an XML snippet that describes them.

By using XML/XSL or CSS in conjunction with HTML, you can easily create beautiful website pages. Or, if Internet isn't your thing, you can utilize the Java programming language to create beautiful applications that can exchange data using XML.
Copyright David McCann 2016. All rights reserved.