object(SimpleXMLElement)#1 (3) {
["@attributes"]=> array(1) {
["responsecode"]=> string(3) "200"
}
["nextpage"]=> object(SimpleXMLElement)#2 (0) {
}
["resultset_web"]=> object(SimpleXMLElement)#3 (2) {
["@attributes"]=> array(4) {
["count"]=> string(2) "10"
["start"]=> string(1) "0"
["totalhits"]=> string(8) "22497060"
["deephits"]=> string(8) "23000000"
}
["result"]=> array(10) {
[0]=> object(SimpleXMLElement)#4 (7) {
["abstract"]=> string(110) "MSN's all-in-one Internet portal, the home of Hotmail, MSN Messenger, MSNBC News, Encarta, and Slate Magazine."
["clickurl"]=> string(360) "http://teqpad.com/www/msn.com"
["date"]=> string(10) "2011/01/14"
["dispurl"]=> object(SimpleXMLElement)#14 (0) {
}
["size"]=> string(5) "82136"
["title"]=> string(3) "MSN"
["url"]=> string(19) "http://www.msn.com/"
}
私はPHPを使用してXML上からtitle
とabstract
の値を抽出したいです。このxmlオブジェクトから値を抽出するにはどうすればよいですか?
を。 –
*(例)* http://de2.php.net/manual/en/simplexml.examples-basic.php – Gordon
は、XMLがすでにSimpleXMLによって解析されているようです。 – badideas