dragongamer Posted August 24, 2006 Share Posted August 24, 2006 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? Quote Link to comment Share on other sites More sharing options...
effigy Posted August 24, 2006 Share Posted August 24, 2006 A colon is used for namespaces. Try one of the namespace methods. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.