Example with Weather

Current Weather Conditions in XML from the National Weather Service
(http://www.weather.gov/xml/current_obs/KBOS.xml:

Observations on XML

<?xml version="1.0" encoding="ISO-8859-1"?> 
<current_observation version="1.0"
	 xmlns:xsd="http://www.w3.org/2001/XMLSchema"
	 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
	 xsi:noNamespaceSchemaLocation="http://www.weather.gov/xml/current_obs/current_observation.xsd">
  <credit>NOAA's National Weather Service</credit>
  <credit_URL>http://weather.gov/ </credit_URL>
  <image>
    <url>http://weather.gov/images/xml_logo.gif </url>
    <title>NOAA's National Weather Service</title>
    <link>http://weather.gov </link>
  </image>
  <suggested_pickup>15 minutes after the hour</suggested_pickup>
  <suggested_pickup_period>60</suggested_pickup_period>
  <location>Boston, Logan International Airport, MA</location>
  <station_id>KBOS</station_id>
  <latitude>42.38</latitude>
  <longitude>-71.03</longitude>
  <observation_time>Last Updated on Oct 21, 8:54 am EDT</observation_time>
  <observation_time_rfc822>Tue, 21 Oct 2008 08:54:00 -0400 EDT</observation_time_rfc822>
  <weather>Mostly Cloudy</weather>
  <temperature_string>51 F (11 C)</temperature_string>
  <temp_f>51</temp_f>
  <temp_c>11</temp_c>
  <relative_humidity>54</relative_humidity>
  <wind_string>From the Southeast at 3 MPH</wind_string>
  <wind_dir>Southeast</wind_dir>
  <wind_degrees>150</wind_degrees>
  <wind_mph>3.45</wind_mph>
  <wind_gust_mph>NA</wind_gust_mph>
  <pressure_string>29.93&quot; (1013.4 mb)</pressure_string>
  <pressure_mb>1013.4</pressure_mb>
  <pressure_in>29.93</pressure_in>
  <dewpoint_string>35 F (2 C)</dewpoint_string>
  <dewpoint_f>35</dewpoint_f>
  <dewpoint_c>2</dewpoint_c> 
  <heat_index_string>NA</heat_index_string>         
  <heat_index_f>NA</heat_index_f>
  <heat_index_c>NA</heat_index_c>
  <windchill_string>NA</windchill_string>
  <windchill_f>NA</windchill_f>
  <windchill_c>NA</windchill_c>
  <visibility_mi>10.00</visibility_mi>
  <icon_url_base>http://weather.gov/weather/images/fcicons/ </icon_url_base>	
  <icon_url_name>bkn.jpg</icon_url_name>
  <two_day_history_url>http://www.weather.gov/data/obhistory/KBOS.html </two_day_history_url>
  <ob_url>http://www.nws.noaa.gov/data/METAR/KBOS.1.txt </ob_url>
  <disclaimer_url>http://weather.gov/disclaimer.html </disclaimer_url>
  <copyright_url>http://weather.gov/disclaimer.html </copyright_url>
  <privacy_policy_url>http://weather.gov/notice.html </privacy_policy_url>
</current_observation>

Copyright © 2002-2009 David P. Heitmeyer

Bookmark and Share