Get children attributes using simplexml

前端 未结 1 1688
时光取名叫无心
时光取名叫无心 2021-01-23 07:14

The xml data looks like this:

    
    
        45<         


        
相关标签:
1条回答
  • 2021-01-23 08:08

    Ok I got it by now. For those interested in the correct solution:

        $namespaces = $xml->entry[$i]->getNameSpaces('true');
        $abc= $xml->entry[$i]->children($namespaces['abc']);
        foreach($abc->rank as $a) {
            $scheme = $a->attributes();
            echo $scheme['scheme'];
            echo " - ";
        }
    
    0 讨论(0)
提交回复
热议问题