Devam Ediyor

517870 PHP SIMPLEXMLELEMENT Expert

i have xml string, which i get as below, but i need to decode the "total", and traverse the bing web search results, can someonse send me the example code for this

I have code as

[code]

$xml = new SimpleXMLElement($content);

echo $start=$xml->SearchResponse->Web->Total;//nothing comes here

foreach($xml->SearchResponse->Web->Results as $value) {

printf('<a href="%s">%s</a><br />',$value->Url,$value->Title);

}

[/code]

where $content is as below XML,

<?xml version="1.0" encoding="utf-8" ?><?pageview_candidate?><SearchResponse xmlns="[url removed, login to view]" Version="2.2"><Query><SearchTerms>සිංහල අලුත්</SearchTerms></Query><web:Web xmlns:web="[url removed, login to view]"><web:Total>797</web:Total><web:Offset>0</web:Offset><web:Results><web:WebResult><web:Title>SINHALA SINGHALA HELA ALUTH AVURUDHU AVURUDU KREEDAA KREEDA ...</web:Title><web:Description>sinhala singhala hela aluth avurudhu avurudu kreedaa kridaa krida සිංහල හෙල අලුත් අවුරුදු ක්‍රීඩා</web:Description><web:Url>http://www.sri-lanka-almanac.com/sri_lanka_almanac_sinhala_new_year_games_portal/sri_lanka_almanac_sinhala_new_year_games_portal.html</web:Url><web:CacheUrl>[url removed, login to view]+%e0%b6%85%e0%b6%bd%e0%b7%94%e0%b6%ad%e0%b7%8a&d=4565541914280836&w=40a95d52,14335b2f</web:CacheUrl><web:DisplayUrl>www.sri-lanka-almanac.com/sri_lanka_almanac_sinhala_new_year_games_portal/sri_lanka...</web:DisplayUrl><web:DateTime>2011-08-13T11:02:00Z</web:DateTime></web:WebResult><web:WebResult><web:Title>SINHALA SINGHALA HELA ALUTH AVURUDHU AVURUDU SIRITH VIRITH ...</web:Title><web:Description>sinhala singhala hela aluth avurudhu avurudu sirith virith wirith chaarithra සිංහල හෙල අලුත් අවුරුදු සිරිත් ...</web:Description><web:Url> ....

Beceriler: .NET, Her şey Kabul, ASP, Oyun Tasarımı, PHP, XML

Daha fazlasını görün: web code expert, php string html, element 8, avurudu sirith virith, bing ad, bd, traverse, xmlns, asp string xml, php encoding, schemas, datetime, php cache, total cache expert, xml decode, bing web search php, code php decode, microsoft expert, searchterms, url datetime, encoding expert, php cache search results, almanac, html encoding, php html expert

İşveren Hakkında:
( 63 değerlendirme ) Sydney, Australia

Proje NO: #2263804