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"> <Price>7.10</Price> <Change>0.00</Change> </Stock> </Market> </ResultSet>
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
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.