Using XML for the weather
This page uses the XML parser that's included with IE 4.0 to download the weather data. The XML data is used to populate the state and city list and to update the table as you select different states and cities. The user selects a city from the list. Upon selection, the citie's weather report and XML fragment that supplied the data is displayed. Data used in this demo can be found here:
Weather XML file
Make an Earthquake!
This page falls into the category of special effects. Essentially a mouseover action, this XML coding incorporates a separate file that is stored on the server to invoke a behavior, and therefore allowing the user use the effect without having to learn javascript. An appropriate namespace is necessary, and the XML tag definition is done in the specific media type, with the behavior applied to the CRT screen. The behavior file is earthquake.htc and must be correctly linked to function properly. On moving your mouse over the item tagged, the entire screen moves 10 pix each way. The link to the page is here: Earthquake XML file
Create a Typewriter Effect!
This XML file is a variable speed typewriter behavior. Essentially identical in detail as the above file, this behavior is that of an old fashioned typewriter, placing one letter on the screen at a time, at a predetermined speed. A namespace and tag definition are necessary as above, and again the file is a linked behavior stored on the server in a separate file, called typewriter.htc. This behavior will display only once upon loading. The link to the example page is: Typewriter XML file
Thanks to SiteExperts.com and DevX.com for the above XML examples.
What's the difference between XHTML and XML? Find out here.
Home