Jump to content

simple xml and :


dragongamer

Recommended Posts

hi, i have a xml file that i need to be prahsed, via php's 5 simplexml_load_file, the only problem is that i need to get the atraibues,
E.G
[code]->foo['OMG'][/code]

but the line that has the data is
[code]<yweather:condition text="Fair" code="34" temp="64" date="Thu, 24 Aug 2006 6:50 pm BST" />[/code]

and if i try
[code]$xml->channel->item->yweather:condition['code'];[/code]

i simply get
[quote]Parse error: syntax error, unexpected ':', expecting ',' or ';'[/quote]

is there a work around or very simple fix for this?
Link to comment
https://forums.phpfreaks.com/topic/18568-simple-xml-and/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.