Created
September 27, 2012 07:25
-
-
Save alxfv/3792660 to your computer and use it in GitHub Desktop.
Access to attribute in SimpleXML
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
header('Content-Type: text/html; charset=utf-8'); | |
$s = file_get_contents('http://bananadream-monkey:8983/solr/select/?q=%D0%BF%D1%83%D1%88%D0%BA%D0%B8%D0%BD%0D%0A&version=2.2&start=0&rows=10&indent=on'); | |
$xml = simplexml_load_string($s); | |
$doc = $xml->result->doc[0]; | |
echo $doc->str[0]->attributes()->name; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment