473,473 Members | 1,816 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

php & xml

Hi,
i am trying to put field from this page in a table,
http://xoap.weather.com/weather/loca...3aa3f76734eadf

i can get the correct data for the current day, but not for the forecast
days <dayf:
<dayf>
<lsup>10/22/07 3:19 PM Local Time</lsup>
- <day d="0" t="Monday" dt="Oct 22">
<hi>N/A</hi>
<low>-1</low>
<sunr>8:02 AM</sunr>
<suns>6:41 PM</suns>
- <part p="d">
<icon>44</icon>
<t>N/A</t>
- <wind>
<s>N/A</s>
<gust>N/A</gust>
<d>N/A</d>
<t>N/A</t>
</wind>
<bt>N/A</bt>
<ppcp>0</ppcp>
<hmid>N/A</hmid>
</part>
- <part p="n">
<icon>31</icon>
<t>Clear</t>
- <wind>
<s>8</s>
<gust>N/A</gust>
<d>360</d>
<t>N</t>
</wind>
<bt>Clear</bt>
<ppcp>0</ppcp>
<hmid>76</hmid>
</part>
</day>
+ <day d="1" t="Tuesday" dt="Oct 23">
......
</day>
....
-<dayf>
f

my code:
$parser = xml_parser_create( );
xml_parser_set_option($parser, XML_OPTION_CASE_FOLDING, 0);
xml_parse_into_struct($parser,$xml,$values,$index) ;
xml_parser_free($parser);
$city = htmlspecialchars($values[$index['dnam'][0]]['value']);
$unit_temp = $values[$index['ut'][0]]['value'];
$unit_speed = $values[$index['us'][0]]['value'];

I can not get the forecast days (1 to 9) in a correct array..
Do i need to parse again??

Thanks for your help
VooDoo
Oct 23 '07 #1
0 1057

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: DrTebi | last post by:
Hello, I have the following problem: I used to "encode" my email address within links, in order to avoid (most) email spiders. So I had a link like this: <a...
0
by: Thomas Scheffler | last post by:
Hi, I runned in trouble using XALAN for XSL-Transformation. The following snipplet show what I mean: <a href="http://blah.com/?test=test&amp;test2=test2">Test1&amp;</a> <a...
4
by: johkar | last post by:
When the output method is set to xml, even though I have CDATA around my JavaScript, the operaters of && and < are converted to XML character entities which causes errors in my JavaScript. I know...
14
by: Arne | last post by:
A lot of Firefox users I know, says they have problems with validation where the ampersand sign has to be written as &amp; to be valid. I don't have Firefox my self and don't wont to install it only...
12
by: InvalidLastName | last post by:
We have been used XslTransform. .NET 1.1, for transform XML document, Dataset with xsl to HTML. Some of these html contents contain javascript and links. For example: // javascript if (a &gt; b)...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.