Forum Moderators: coopster
I also need to use code similar to the following:
<?php
$doc = DOMDocument::loadXML($information);
$result_node = $doc->getElementsByTagName('resultset_web');
$tHits = $result_node->item(0)->getAttribute('totalhits);
?>
/* XML TO BE PARSED */
$information = '<ysearchresponse responsecode="200">
<prevpage>
/ysearch/web/v1/sunflower%20seeds?appid=e4j0dGfIkY0.VnPaj_m8JivWDmAdWAV50uTRuIaqvA--&format=xml&count=1&start=0
</prevpage>
<nextpage>
/ysearch/web/v1/sunflower%20seeds?appid=e4j0dGfIkY0.VnPaj_m8JivWDmAdWAV50uTRuIaqvA--&format=xml&count=1&start=2
</nextpage>
<resultset_web count="1" start="1" totalhits="376055" deephits="11600000"><result>
<abstract>
Home to the <b>seed</b> brand featuring products, nutrition facts, and more.
</abstract>
<clickurl>
http://lrd.yahooapis.com/_ylc=<snip>-/SIG=10v00dabm/**http%3A//www.example.com/
</clickurl>
<date>2008/12/12</date>
<dispurl>www.<b>example.com</b></dispurl>
<size>7122</size>
<title>David <b>Sunflower</b> <b>Seeds</b></title>
<url>http://www.example.com/</url>
</result>
</resultset_web>
</ysearchresponse>'
Thanks in advance!
[edited by: eelixduppy at 9:30 pm (utc) on Mar. 1, 2009]
[edit reason] exemplified and fixed side scroll [/edit]