Xml webtags

From Cumulus Wiki
Revision as of 17:44, 5 September 2009 by Daj (talk | contribs) (Added a link to PHP webtags)
Jump to navigationJump to search
Name: XML Webtags
Type: Web templates, XML
Author: MarkB
Contact: 'MarkB' via forum
Last update: 4 Sept 2009
Version: 1.6

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.6.zip
  • Unzip the files, which will produce one file (cumulusxml.tlp)
  • 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.


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>