XML, or extensible Markup Language, is a language based on web standards use by various communities and products. Similar to HyperText Markup Language, or HTML, XML is more concerned with data display than the presentation (Robbins, 2006). XML provides a unique structure that enables developers to define their own tags and attributes for elements. Defining such a unique set tags gives their intended audience data in a specific information format. Identifying difference of XML and HTML, examining XML standards, and providing XML examples will explain why XML is an important data exchange markup language standard.
In order to understand XML it is important to understand HTML and differences between the two languages. The core technology for web page design is HTML. This language provides a non-programming language that marks up a page through use of tags to present objects. Angle bracket with keywords inside in an open and closing format provides instructions for a browser to interpret to display objects. Not all objects of HTML actually have open and close tags. Examples of standard HTML tags include “ ”, “” objects which produce a link and text input. Attributes are associated with objects allow displaying variations to the rendered objects. A browser is used to generate a page based on the objects that are displayed in order. Presentation of content employs a static method. Constant updates to pages are an inherent setback for using HTML. Additional technologies are required to make content dynamic on standard pages.
Similar to HTML XML has a particular structure for displaying information. However XML does not display objects, but rather elements with data assigned. Unlike HTML, XML begins with no characteristics (Castro, 2001) and must be defined within the structure. We still employ the angle bracket method with keywords inside to indicate elements. Attributes of an element are loosely similar to an HTML objects in that they are further define content. Other than these likenesses XML is different than HTML. XML allows a developer to devise his or her own tags. Unlike HTML, XML does not actually render in a browser. Instead it provides a layout of information through elements, attributes, and values. In order for the browser to identify XML there are certain standards that must be included in the page. Basic rules apply to XML with regards to named elements. Use of angled brackets is strictly used for definition of elements, attributes, and values (Robbins, 2006). No element may begin with a number or punctuation. Upper and lower case names are considered different elements. Spaces are not included in names, but underscores are permitted. Best practice is to avoid punctuations such as commas, dashes, colons, and semi-colons.
Declaration of XML begins at line one of the document (St. Laurent & Fitzgerald, 2005). Inside the regular angled brackets is “?XML” which indicates the following structure will be an XML formatted document. Attributes of the “” document include version and encoding methods. There is currently two versions, 1.0, and 1.1. Respectively restricting more in the latest version than earlier version. A version attribute is added within the < and > as “version=1.0”. An encoding attribute is not required and can reference specific key code sets that are useful with transmission. For instance there are two formats that are commonly used (Refsnes Data, 2012). “UTF-8” and “UTF-16” indicate which character set this XML page uses to render. The difference here is the 8 and 16. “UTF-16” provides a larger character set that includes special characters usually pertaining to other languages and mathematical computations. d Once declaration is completed the next line of the document pertains to the schema. Normally a document type definition, or DTD, is referenced which is widely used rules of how to parse HTML (Castro, 2001). There are several different types of DTD such as strict, loose, and frameset. Each of these DTD types was devised to allow or not allow conformity to HTML structure (Refsnes Data, 2012). It is important to point out that DTD can be standalone files that are included in XML documents. These simple formats exist to set basics of the elements. Unlike DTD, which are not predefined elements; schemas are defined sets of what an element attributes may be defined.
Schema is a way for XML to further define how to structure information. This may be a benefit in certain instance to define what elements, attributes, child elements, order of child, number child, data types, and values of all before data is included in the structure (Jervis, 2002). Defining the structure of XML through scheme, although not required, defines order, types, sets values requirements, and fixes length to restricts elements to specific types of data or classes (Refsnes Data, 2012). Included in the XML document within the angle brackets is reference to a schema type, similar to “”. This schema reference uses a format set by the website it for elements. When XML is displayed on page the “” indicates a schema string element with the name xxx and type as a string. There are several pre-defined types such as decimal, integers, date, and time to name a few. Pre-defining using schema gives structure to XML outcome for the intended audience usage.
Regardless of using DTD or Schema XML permits developers to invent a structure like “Kephart32”. The “person” element includes two attributes, lastname and age. A similar way to conceive an XML format might be “”. Either way the data in the element is still available and can be used for presentation. In depth information is daily used with regards to weather, new, and blog feeds.
Incorporation data from other web pages through uses of XML gives a unique opportunity for web designers. Content is key in this information age. Customization of the look and feel for presentation is really a combination of the information and it’s integration into existing pages. Observe that many major websites visited provide similar if not the same content published. Since XML is an open and useful format it can translate into man different presentations. Use of other technologies such as CSS and JavaScript present’s advantages over other sites that simply present plainly.
Major search engines like Bing and Google use their methods to seek out and respond back to visitor’s request. Information exchange between companies is another use for XML. An application like Microsoft Office produces an XML schema and simpler formatted XML for transmission. Open source applications also include this format for saving. XML is a practical language that provides little rules on some respect but strong when needed.
XML is the language of choice for data presentation due to its ability to customize elements, attributes, and set values. The flexibility the language provides allows developers a customized solution for a particular end result requirement. Extraction of data to produce information is perhaps the most valuable aspect of the language. Reusability of the defined data maintained in the elements and attributes enables XML to show its resilience. Xml enables web designers the power to manage information in a extraordinary manner (Castro, 2001). This also includes combing with other languages to provide a visual appealing reference to the core of information.
References:
Castro, E. (2001). XML for the world wide web. Berkeley, CA, USA: Peachpit.
Jervis, M. (2002, 11 26). XML DTDs Vs XML Schema. Retrieved 09 29, 2012, from sitepoint: http://www.sitepoint.com/xml-dtds-xml-schema/
Refsnes Data. (2012). XML Syntax Rules. Retrieved 09 29, 2012, from W3schools.com: http://www.w3schools.com/xml/xml_syntax.asp
Robbins, J. N. (2006). HTML & XHTML Pocket Reference (Vol. 3). Sebastopol, CA, USA: O'reilly.
St. Laurent, S., & Fitzgerald, M. (2005). XML Pocket Reference (Vol. 3). Sebastopol, CA, USA: o"reilly.