XMLReader not reading in all elements requested

Inobiotte

New Member
So I have this XML\[code\]<entry><id>ABC123</id><title type="text">title </title><author xmlns="http://www.w3.org/2005/Atom"> <name>test.com</name></author><link rel="self" href="http://www.test.com/asdasd.html"/><updated>2012-07-04T06:12:15.337</updated><content type="xml"> <listing systemId="thesystemid" url="www.myurl.com"> <description> This is a description </description> </listing></content></entry>\[/code\]I'm using XMLReader with this code and I'm pulling in the data using this:\[code\]$url = $product->content->listing['url'];$id = $product->id;$name = $product->title;$desc = $product->content->listing->description;\[/code\]Everything is being pulled in perfectly apart from $desc $product has been set as 'entry'I just cannot see why, any ideas?Error is \[code\]Notice: Trying to get property of non-object in......\[/code\]Cheers
 
Back
Top