Examples/ways to quickly parse xml responses?

thread: 3 messages  |  last: a year ago  |  started: sunday, april 18, 2010, 8:16 am pdt


#1  |  kingwithin (San Francisco, CA) United States of America
Sunday, April 18, 2010, 8:16 AM PDT

I am integrating to third-party API's and am seeking a way or examples to leverage qcodo (hopefully plugins) for executing the CURL and then parsing the XML into the respective objects.

Thanks.

#2  |  kingwithin (San Francisco, CA) United States of America
Sunday, April 18, 2010, 8:41 AM PDT

For example, after excuting CURL, I get back something like:

<person>
 <id>
 <first-name />
 <last-name />
 <headline>
 <location>
   <name>
   <country>
     <code>
   </country>
 </location>
 <industry>
 <distance>
 <relation-to-viewer>
   <distance>
 </relation-to-viewer>
 <num-recommenders>
 <current-status>
 <current-status-timestamp>
 <connections total=“" >
 <summary/>
 <positions total=““>
   <position>
     <id>
     <title>
     <summary>
     <start-date>
       <year>
       <month>
     </start-date>
     <is-current>
     <company>
       <name>
     </company>
   </position>
 <educations total=““>
   <education>
     <id>
     <school-name>
     <degree>
     <start-date>
       <year>
     </start-date>
     <end-date>
       <year>
     </end-date>
   </education>
 </educations>
 <member-url-resources>
   <member-url>
     <url>
     <name>
   </member-url>
 <api-standard-profile-request>
   <url>
   <headers>
     <http-header>
       <name>
       <value>
     </http-header>
   </headers>
 </api-standard-profile-request>
 <site-standard-profile-request>
   <url>
 </site-standard-profile-request>
 <picture-url>
</person>

I need to put the corresponding information into the object

#3  |  VexedPanda (Calgary, AB) Canada
Monday, April 19, 2010, 8:40 AM PDT

Answered in your QCubed post:
http://qcu.be/content/how-do-i-transform-xml-array-data-object#comment-4730



Copyright © 2005 - 2012, Quasidea Development, LLC
This open-source framework for PHP is released under the terms of The MIT License.