Why is this xmlreader code not working?

后端 未结 3 1147
一个人的身影
一个人的身影 2021-01-07 05:05

I have a file that looks like this:

    
       About.com: Animation Guide         


        
3条回答
  •  北荒
    北荒 (楼主)
    2021-01-07 05:28

    Here's an alternate way to get to that attribute:

    $string = file_get_contents($filename);
    $xml = new SimpleXMLElement($string);
    $result = $xml->xpath('/RDF/ExternalPage[*]/@about');
    var_dump($result);
    

提交回复
热议问题