XML Programming
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsProgramming Languages - MoreXML Programming

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
Stay one step ahead of the competition. Evaluate and give feedback on some of the hottest web development tools on the market today. Make your opinion heard! Click Here
  #1  
Old June 29th, 2003, 12:36 PM
Coopercentral2 Coopercentral2 is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Apr 2003
Location: US
Posts: 261 Coopercentral2 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 1 h 54 m 29 sec
Reputation Power: 6
Send a message via AIM to Coopercentral2
XML Error

Hi:

On my site, I'm assembing a weather system, where you enter your zipcode, and it retrieves weather data via XML source. My website is:

http://www.coopercentral.org/weather/index.php

Just enter your zipcode, then you'll get your weather. The XML source is:

http://ejse.com/WeatherService/Serv...ndedWeatherInfo

At the end, you put ?zipcode=x -- Where x is your zipcode. Go to the page that I specified above, my website, and when you enter your zipcode. Then look at the big bold numbers, that tell your temperature. Notice there's a "Â". I don't want that letter there. How can I remove that letter? Thanks a lot, I really appreciate it!!

Ken Cooper
__________________
Thanks!

Reply With Quote
  #2  
Old June 29th, 2003, 01:27 PM
Coopercentral2 Coopercentral2 is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Apr 2003
Location: US
Posts: 261 Coopercentral2 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 1 h 54 m 29 sec
Reputation Power: 6
Send a message via AIM to Coopercentral2
um... I'm sorry, I'm really new to XML. I created the script from PHP, but am parsing it using XML. I don't know what you mean by that. Could you please tell me what to do? Here's the code:

PHP Code:
<?php

include("functions.php");

echo 
"<style>
body    { font-family: Verdana; font-size: 10pt }
table    { font-family: Verdana; font-size: 10pt }
</style>"
;

if(!
$submit) {

    echo 
"<form method=\"POST\" action=\"$PHP_SELF\">
    <p align=\"center\">Your Zip Code: <input type=\"text\" name=\"zipcode\">
    <input type=\"submit\" value=\"Get Weather >>\" name=\"submit\"></p>
    </form>"
;

} else if(
$submit && empty($zipcode)) {

    echo 
"<center>Please enter a zipcode, thanks!</center>";

} else if(
$submit && !empty($zipcode)) {

    
$grab "http://ejse.com/WeatherService/Service.asmx/GetExtendedWeatherInfo?zipcode=$zipcode";
    
$fp fopen($grab"rb");
    
$contents fread($fp9999999);
    
fclose($fp);

    
$location untag($contents"Location");
    
$forecast untag($contents"Forecast");
    
$temperature untag($contents"Temprature");
    
$feelslike untag($contents"FeelsLike");
    
$visibility untag($contents"Visibility");
    
$pressure untag($contents"Pressure");
    
$dewpoint untag($contents"DewPoint");
    
$uvindex untag($contents"UVIndex");
    
$humidity untag($contents"Humidity");
    
$wind untag($contents"Wind");
    
$reported untag($contents"ReportedAt");
    
$updated untag($contents"LastUpdated");
    
$icon untag($contents"IconIndex");

    echo 
"<h1 align=\"center\">View Your Weather</h1>
    <table><tr><td><p align=\"center\"><img src=\"icons/"
.$icon[0].".gif\"></td><td>
    <p align=\"center\"><font size=\"5\"><b>"
.$temperature[0]."</b></font></td>
    </tr><tr><td><p align=\"center\"><b><span style=\"font-size: 9pt\">"
.$forecast[0]."</span></b></td>
    <td><p align=\"center\"><b><span style=\"font-size: 9pt\">Feels Like "
.$feelslike[0]."</span></b></td>
    </tr></table><br><table><tr><td>UV Index:</td><td>"
.$uvindex[0]."</td>
    </tr><tr><td>Dew Point:</td><td>"
.$dewpoint[0]."</td></tr><tr>
    <td>Humidity:</td><td>"
.$humidity[0]."</td></tr><tr> <td>Visibility:</td><td>".$visibility[0]."</td>
    </tr><tr><td>Pressure:</td><td>"
.$pressure[0]."</td></tr><tr><td>Wind:</td> <td>".$wind[0]."</td></tr></table><p>As reported at: ".$reported[0]."<br>Last updated: ".$updated[0]."</p>";

}

?>


Thanks a lot for your help!!

Reply With Quote
  #3  
Old June 29th, 2003, 04:31 PM
Coopercentral2 Coopercentral2 is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Apr 2003
Location: US
Posts: 261 Coopercentral2 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 1 h 54 m 29 sec
Reputation Power: 6
Send a message via AIM to Coopercentral2
Thanks a lot, I really appreciate it!! I'll tell you how it works out!!

Ken Cooper

Reply With Quote
Reply

Viewing: Dev Shed ForumsProgramming Languages - MoreXML Programming > XML Error


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 6 hosted by Hostway