WebRef Update: Featured Article: X(ML) Marks the Spot | 2
X(ML) Marks the Spot
If you open a font tag and forget to close it in with </font>, your browser will have a fit and your document won't show. The basic rule therefore is that every tag must be opened and closed in a logical order. A logical order means that this works:<b><i>bold&italic</i></b> and this doesn't: <b><i>bold&italic</b></i>. Just in case you're wondering, this won't work either: <b><i>bold&italic</I></B>. It's either uppercase or lowercase, there's no mixing involved in this game. Last but not least, <font color=white> won't work either, so don't forget your quotation marks. So this bug/feature will certainly haunt you for the first few XML documents you create (and probably all your documents when you are coding past your bedtime).
The validity issue has another aspect: what about tags that aren't open or closed? The break tag <br> is a good example. This problem was solved with the syntax <br/>. Easy, isn't it? Another example to bring the point home: to place an image in the whatever.xls page use <img src="graphic.gif"/>.
Nowadays, many coders use an editor for tasks such as creating the code to place a Flash animation in a page. If you use Macromedia's Aftershock tool for Flash or Director, you'll have to adjust the code to be well-formed:
codebase="http://active.macromedia.com/flash2/cabs/swflash.cab#version=3,0,0,0" ID="projectxml" WIDTH="570" HEIGHT="100"> <PARAM NAME="movie" VALUE="flashanimation.swf"/> <PARAM NAME="quality" VALUE="autohigh"/> <PARAM NAME="bgcolor" VALUE="#FFFFFF"/>
<EMBED SRC="images/projectxml.swf" swLiveConnect="FALSE" WIDTH="570" HEIGHT="100" QUALITY="autohigh" BGCOLOR="#FFFFFF" TYPE="application/x-shockwave-flash" PLUGINSPAGE="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash"> </EMBED> </OBJECT>
So where is XML going?
In the future, it's likely that XML programming and all its related applications (such as SMIL) will be as important in Internet development as predicted. HTML will not vanish off the face of the Earth; it will probably remain an important part of development. XML will, however, be an eXtensive framework to create an unimaginable amount of subset applications, such as the Wireless Application Protocol Markup Language (WML) and many others. XML has opened many exciting doors for both programmers and interactive designers.
About the author:
Leroyson Figueira is a freelance Web integrator based in Amsterdam, the Netherlands. He is currently enjoying himself with Flash 4, XML and beta-WAP applications. He can be reached at: firstname.lastname@example.org or at www.redhotmedia.nl.
Previous: Three Pages of an XML Document
Revised: May 16, 2000