homepage Welcome to WebmasterWorld Guest from
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member

Home / Forums Index / Code, Content, and Presentation / PHP Server Side Scripting
Forum Library, Charter, Moderators: coopster & jatar k

PHP Server Side Scripting Forum

How to parse an APIs REST response?

 5:56 pm on Sep 13, 2006 (gmt 0)

I started working with a few apis today to try a mashup. Ive never worked with rest before, and im having troubles finding help on how to parse the REST that the api sends to me.

<ResultSet xsi:schemaLocation="urn:search http://prices.xsd">
<Market id="51472" symbol="ADSRV2" name="Ad Services">
<Stock id="51473" symbol="CJ" name="Commission Junction">

Im not sure if I should be treating it like regular xml, or if theres a particular way to treat the xml. I can parse it to the page, but I cant figure out how to get the properties and attribues out... For example, it outputs 7.00 and 0.00 but wont say the symbol ADSRV2 or any of the other info.
Does anyone have any experiance with this? From my reading such as »codewalkers.com/tutorials/50/6.html your not really supposed to take the id, symbol and name. Although I think the data is useless without it

Thanks, John



 5:27 am on Sep 14, 2006 (gmt 0)

Anyone have any advice or can anyone point me to the right direction? Ive tried a few other sites forums, and no one seems to know anything about this, or maybe im asking wrong? Maybe move the post?

Anything at all appreciated.

Thanks, John


 5:32 am on Sep 14, 2006 (gmt 0)

i use DOMIT for all my XML parsing.


go through the examples and docs. you can parse the XMl and extract values and attributes. just take some visualization of the tree to get the correct nodes and then extracting the values or attributes.

good luck :-)

Global Options:
 top home search open messages active posts  

Home / Forums Index / Code, Content, and Presentation / PHP Server Side Scripting
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved