Xml webtags

From Cumulus Wiki
Revision as of 16:34, 2 February 2010 by Daj (talk | contribs) (changed category)
Jump to navigationJump to search
Name: XML Webtags
Type: Web templates, XML
Author: MarkB
Contact: 'MarkB' via forum
Last update: 19 Jan 2010
Version: 1.8

Cumulus automatically prepares a number of webpages by using HTML template files. These files contain webtags which Cumulus replaces with actual values from your weather station.


XML Webtags takes this a step further and produces a full list of webtags in an XML format. You can then include this file when building your own webpages or weather tools.


The XML file contains all current webtags produced by Cumulus.

A similar project is available for PHP Webtags


Installation

ScreenShotForXMLSetup.png
  • Download http://wiki.sandaysoft.com/files/xmltemplate.1.8.zip
  • Unzip the files, which will produce one file (cumulusxml.tpl)
  • Copy the file into your Cumulus folder on your PC
  • Within Cumulus click Configuration, Internet, then the 'Files' tab
  • Add a new entry in one of the blank lines.
Local filename is the full path and filename of cumulusxml.tlp
Remote filename can be anything however it should be the path to your HTML files and a filename, ending in XML.
  • You must tick 'Process' and 'FTP' to allow Cumulus to add values to the file and upload it.
  • Optionally, if you wish to produce an XML file in realtime tick the 'Realtime' option too. Only use this option if the tool you are using with XML on your website expects almost live data. WARNING -- this will generate a significant amount of data upload throughout the day as each XML upload is about 56k. If you do this in realtime (say every 15 seconds) that is 320Mb per day. If you have bandwidth limitations this could be a problem

Example Output file

relatime.xml -- Note this file has been truncated simply to show the start and end of the file.

<?xml version="1.0" encoding="ISO-8859-1"?>
<!--Cumulus WebTag XML Data file - version 1.6-->
<weatherdata>
<timetags>
    <item name="date">
        <value>05/09/2009</value>
        <unit></unit>
		<image></image>
		<class>dynamic</class>
		<description>The current date</description>
	</item>
	<item name="time">
		<value>17:40 on 05 September 2009</value>
		<unit></unit>
		<image></image>
		<class>dynamic</class>
		<description>The current time</description>
	</item>
	<item name="day">
		<value>05</value>
		<unit></unit>
		<image></image>
		<class>dynamic</class>
		<description>The current day as a 2-digit number</description>
	</item>
	<item name="dayname">
		<value>Saturday</value>
		<unit></unit>
		<image></image>
		<class>dynamic</class>
		<description>The current day as a word</description>
	</item>
	<item name="shortdayname">
		<value>Sat</value>
		<unit></unit>
		<image></image>
		<class>dynamic</class>
		<description>The current day as a shortened word</description>
:
:
:
	<item name="RCwgustTM">
		<value>10.7</value>
		<unit><![CDATA[ mph]]></unit>
		<image></image>
		<class>dynamic</class>
		<description>Recent high wind gust</description>
	</item>
	<item name="RCwspeed">
		<value>4.2</value>
		<unit><![CDATA[ mph]]></unit>
		<image></image>
		<class>dynamic</class>
		<description>Recent wind speed</description>
	</item>
</nocommatags>
</weatherdata>