XML stands for eXtensible Markup Language. Extensible—as in being extendable and flexible at the same time. Extendable because the language can be extended to contain any value, and flexible because there are very few limitations. To help understand how XML is useful to the programming community, it may be useful to examine HTML, a markup language that has been around for quite a while. HTML stands for HyperText Markup Language. It contains the instructions that a Web browser, such as Microsoft Internet Explorer, uses to display the information contained in an .htm or .html file. An .htm file is simply a text file that contains special markups, also known as tags. The tags instruct the browser where to start an instruction and where to stop. Let's relate HTML to something that Access developers are more familiar with, such as VBA. Both languages provide intrinsic functionality. HTML uses tags and VBA uses statements such as If, Do, or Stop.
When the Web page is rendered, the text is translated from plain text characters to the rich presentation layout, based on the instructions contained within the tags. Tags are denoted by the text, which are enclosed between the Greater Than (<) and the Less Than (>) symbols. The HTML of any Web page can be displayed by choosing View/Source from the main menu of Internet Explorer. The following example displays an HTML source file:
<IMG height=10 src="Investing Lessons_files/1p-trans.gif" width=400
border=0> </TD><!-------------------------RIGHT SIDE MARGIN------
<TD vAlign=top align=middle width=180 bgColor=#ffffff>
<TABLE cellSpacing=0 cellPadding=7 bgColor=#ffff99 border=0> <TBODY> <TR>
<TD vAlign=center align=middle bgColor=#ffff00><FONT
face="verdana, arial, helvetica, sans-serif" size=1><B>MORE INFORMATION</B><BR></FONT></TD></TD>
<TD><BR><FONT face="verdana, arial, helvetica, sans-serif" size=2><B>More by this author...</B><BR>
In the previous code example, there are tags to instruct the browser to display a picture <image> </image>, place some data within a table <td></td>, and format the text in bold <b></b>. There are many other tags in the example, but the important thing to understand is that each tag can only perform one function. Just like VBA, which has reserved words such as Left, Date, or Mod, each HTML tag performs a specific function that is predefined in advance. Attempting to use the tag for any other function may produce an error or undesired results.
Was this article helpful?