Simple XML Parse?

Discussion in 'Programming' started by dawilster, Aug 30, 2009.

  1. #1
    Hi guys I've been looking into the yahoo boss api and I've been able to parse everything after the results tag but i cant get the attributes of the resultset_web tag

    Xml file:

    <ysearchresponse responsecode="200">
    −
    	<nextpage>
    /ysearch/web/v1/games?format=xml&count=10&appid=UiwKRWfV34F7ge6N2VQYeW_AYqNB0zIzIXPNu3VYV7Xe88Y7DnblK9dUEmq9jbNZ&start=10
    </nextpage>
    −
    	<resultset_web count="10" start="0" totalhits="250736173" deephits="5340000000">
    Code (markup):
    How would i get the resultset_web -> totalhits

    Basically how would i parse it so when i go $totalhits it will come out with 250736173

    Thanks a lot guys
     
    dawilster, Aug 30, 2009 IP
  2. pneulameiro

    pneulameiro Peon

    Messages:
    440
    Likes Received:
    4
    Best Answers:
    0
    Trophy Points:
    0
    #2
    Basically in the same way that you get the "count" and "start" attributes. What is your xml parser?
     
    pneulameiro, Aug 31, 2009 IP