how to read nested xml return by linked

SoonerDude

New Member
i am getting some information from linkedin in xml format.i have got all the information expect the company name.following is the API request to linkedin.\[code\]$client->setUri('https://api.linkedin.com/v1/people/~:(id,first-name,last-name,maiden-name,formatted-name,suggestions,date-of-birth,headline,location:(name),industry,distance,last-modified-timestamp,current-share,network,connections,num-connections,num-connections-capped,summary,specialties,proposal-comments,associations,honors,interests,positions,publications,patents,languages,skills,certifications,educations,courses,volunteer,three-current-positions,three-past-positions,num-recommenders,recommendations-received,phone-numbers,im-accounts,twitter-accounts,primary-twitter-account,bound-account-types,mfeed-rss-url,following,job-bookmarks,related-profile-views,public-profile-url,group-memberships,picture-url)');$client->setMethod(Zend_Http_Client::GET);$response = $client->request();$content = $response->getBody();$xml = simplexml_load_string($content);\[/code\]$company = $xml->{'three-current-positions'};print_r($company);following is the output:\[code\]SimpleXMLElement Object ( [@attributes] => Array ( [total] => 1 ) [position] => SimpleXMLElement Object ( [id] => 181388161 [title] => PHP Developer [summary] => Developing Web Applications for Iphone , Androide and Blackberry [start-date] => SimpleXMLElement Object ( [year] => 2011 [month] => 1 ) [is-current] => true [company] => SimpleXMLElement Object ( [id] => 25586 [name] => NSD [size] => 11-50 employees [type] => Public Company [industry] => Computer Software ) ) )\[/code\]how can i read the the 3 different records in php ? please help.
 
Back
Top