Using XML to show weather data on any web page

From Weather-Watch Wiki

Using XML to show weather data on any web page

Note Still needs some work!

By using an XML data file you can create a static Weather Display web page that doesn't need to be uploaded frequently and also update multiple web pages just by uploading a single file. This is a good way to reduce upload traffic or to display data from multiple stations.

Step by step example

  1. Tick the option in the Custom Web Page setup, under Setup, FTP/Internet setup.
  2. If a template file hasn't already been created, Weather Display will create a new template file called wdfulldata.htm, at the custom web page update times, or you can set times to update and upload the wxlocal.html file (even if you don't have it in use) in the Customise internet and file creation setup. You can alter this afterwards. From that wdfulldata.xml is created and uploaded. Then to use the data in the xml page (and any number of pages can use this one page, or you can even use pages from other web sites) to add (example) to your custom web pages (and you can even add to the default wd datahtm0.txt etc if you tick that option).
  3. Add the following code somewhere near the start of your HTML code, i.e. after the BODY command. Each ID must be different and formatted as 'dsoCitySt', according to the city and state you are grabbing data from, e.g. dsoOmahaNE
  4. Now create a table. Tables are needed for this to work. The table tag should look like this: ??? You can add anything into this table tag, but DATASRC="#dsoCityST" must be included in it.
  5. Grab the data! Where you want the temperature to be, you simply add and that's it! This will go where you would normally add your WD tags. Of course, you will still need to add units text, e.g. 'mph' and text after that as you normally would using a WD template.

Tables cannot share data. Each City/State must have its own table to work. There is no closing tag for the XML. Your normal will work for this.

Example:

°C (°F) kts at time/date:/

Note To use data from other web sites you will need to adjust your browser settings.

  1. In IE, go to Tools > Internet Options > Security Tab.
  2. Select Internet
  3. Select Custom Level.
  4. Select Access Data Sources Across Domains from Miscellaneous