FUDforum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » Imported messages » comp.lang.php » xml parsing issue
Show: Today's Messages :: Polls :: Message Navigator
Return to the default flat view Create a new topic Submit Reply
xml parsing issue [message #184698] Sat, 18 January 2014 09:54 Go to previous message
Rob B is currently offline  Rob B
Messages: 1
Registered: January 2014
Karma:
Junior Member
I feel pretty stupid posting this but I just can't sort it. I have a very short and simple piece of XML and I can't parse it, I have parsed xml in the past without issue but this I just can't sort for some reason.

The XML:

<?xml version="1.0" encoding="UTF-8"?>
<RegionalFcst xmlns="www.metoffice.gov.uk/xml/metoRegionalFcst"
issuedAt="2014-01-18T04:00:00"></RegionalFcst>


A print_r of the simplexml object it is loaded into:

(
[@attributes] => Array
(
[issuedAt] => 2014-01-18T04:00:00
)

)

All I want is that"issuedAt" time stamp, but it's an attribute not an element. I have tried a foreach through @attributes and got nothing. I am even thinking of streaming it through an awk script (hosted on linux). I really would like to avoid that and stay within PHP.

Any help appreciated.

Rob
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Previous Topic: How to locally install Wordpress, Ubuntu 8.10 , XAMPP already installed.
Next Topic: strange parameters...
Goto Forum:
  

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ]

Current Time: Thu Nov 21 23:02:50 GMT 2024

Total time taken to generate the page: 0.03444 seconds