The Need for XML - HTML

The Web is all about markup, but it’s also about data. This is true whether the data is document-centric, such as the kind of content in a magazine or journal, or more granular, such as the kind of data extracted from a database.

One problem with this type of data is that it can be difficult to extrapolate across different software environments and platforms because it has traditionally been stored in proprietary formats. What if you were able to instead develop a set of rules defining a table of text-based data and simply wrap markup around each chunk of data?Such data could be as simple as a Web configuration file that stores settings on how a Web server is configured, such as this piece of code from a .NET web.config file:

<add key=”DSN”

Or, the data could be much more complex, derived from a large number of relational tables requiring a carefully constructed set of rules in order for the processing software to know what each element means. Many modern database systems, such as Oracle, can now be used to extract such data into sets of marked-up elements. These result in documents that can be easily shared across platforms, software environments, and even other companies and organizations, because the markup these documents are based on, XML, has consistent rules worldwide. The key to this kind of integration is the use of documents that define rules for what an element means. There isn’t much good to having the following element if you don’t know what the element is supposed to do:


Is it a book named United? Or does it refer to booking a passenger seat on United Airlines? By developing a document containing rules that describe an element’s use and purpose, you can use XML to provide a human readable and machine-portable database that can be easily used among different software languages and environments. In addition, you can imagine the programming possibilities when you consider that each element in an XML document is an object that can be manipulated by JavaScript or another kind of language, such as Java or C#. This is made possible by the Document Object Model, which consists of a series of standardized methods and properties created by the W3C to access parts of an XML document using object-oriented languages.

Some specific uses for XML include the following:

  • Use it to store data outside your HTML.
  • Use it to store data inside HTML pages as “Data Islands.”
  • Use it to share and exchange data between incompatible systems.
  • Use it as a data storage mechanism completely outside the HTML layer.
  • Use it to make data available to runtime languages such as JavaScript or an object-oriented language such as Java, C#, or Basic/Visual Basic.
  • Use it to make your data human-readable.
  • Use it to invent new languages or plug data into an existing language (a process called transformation, which you’ll see in the section on XSL).

All rights reserved © 2020 Wisdom IT Services India Pvt. Ltd Protection Status

HTML Topics