Jump to content

How can I get to this SimpleXMLElement object's attributes?


ricklee

Recommended Posts

Hi Everyone,

I was wondering if someone might be able to help me with this.  I'm having trouble getting to the string in this object:

 

object(SimpleXMLElement)#2 (1) {
  [0]=>
  string(4880) "fasdfa...etc."
}

 

$goody->0 doesn't work

$goody->attributes() doesn't work either

 

Here's the code that produced the dump:

$filename = 'test_feeds/feed.xml';
$feed = simplexml_load_file($filename); 

$description = $feed->channel->item->description;
$goody = simplexml_load_string($description, 'SimpleXMLElement', LIBXML_NOCDATA);

print var_dump($goody);

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.