|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
I am trying to transform a weather XML file.
I am using this code on an asp page... <html> <body><script type="text/javascript">// Load XML var xml = new ActiveXObject("Microsoft.XMLDOM") xml.async = false xml.load("KHZY.xml") // Load XSL var xsl = new ActiveXObject("Microsoft.XMLDOM") xsl.async = false xsl.load("KHZY.xsl") // Transform document.write(xml.transformNode(xsl))</script> </body> </html> This is the xml code I will be using... <?xml version="1.0" encoding="UTF-8" ?> <current_observation> <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>Ashtabula County Airport, OH</location> <station_id>KHZY</station_id> <latitude>NA</latitude> <longitude>NA</longitude> <elevation>NA</elevation> <observation_time>Last Updated on Oct 10, 12:53 pm EDT</observation_time> <weather>Overcast</weather> <temperature_string>59 F (15 C)</temperature_string> <temp_f>59</temp_f> <temp_c>15</temp_c> <relative_humidity>60</relative_humidity> <wind_string>From the Variable at 6 MPH</wind_string> <wind_dir>Variable</wind_dir> <wind_degrees>999</wind_degrees> <wind_mph>5.75</wind_mph> <wind_gust_mph>0</wind_gust_mph> <pressure_string>30.24" (1023.9 mb)</pressure_string> <pressure_mb>1023.9</pressure_mb> <pressure_in>30.24</pressure_in> <dewpoint_string>45 F (7 C)</dewpoint_string> <dewpoint_f>45</dewpoint_f> <dewpoint_c>7</dewpoint_c> <heat_index_string>Not Applicable</heat_index_string> <heat_index_f>Not Applicable</heat_index_f> <heat_index_c>Not Applicable</heat_index_c> <windchill_string>58 F (14 C)</windchill_string> <windchill_f>58</windchill_f> <windchill_c>14</windchill_c> <visibility>10.00 mi.</visibility> <two_day_history_url>http://www.weather.gov/data/obhistory/KHZY.html</two_day_history_url> <ob_url>http://www.nws.noaa.gov/data/METAR/KHZY.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> I have tried to make an xsl page that would work and I can not seem to make it work. Can somebody help me by making a very simple xsl page that works. Thanks So Much!!! ![]() |
![]() |
| Viewing: Dev Shed Forums > Programming Languages - More > XML Programming > XSL Transformation HELP?!!! |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|