尝试在PHP中获取ds:X509Certificate
的节点值。我能够导航到IDPSSODescriptor
标签,任何关于如何访问子节点值的指针。
<EntityDescriptor>
<IDPSSODescriptor>
<ds:Signature >
<ds:SignedInfo>..</ds:SignedInfo>
<ds:SignatureValue>..</ds:SignatureValue>
<ds:KeyInfo>
<ds:X509Data>
<ds:X509Certificate/>
</ds:X509Data>
</ds:KeyInfo>
<test>
<test2>
</IDPSSODescriptor>
</EntityDescriptor>
php代码到目前为止工作,
$data = $idp_xml->IDPSSODescriptor->attributes()->ID;
我试过了,
$xml = new SimpleXMLElement($idp_xml->IDPSSODescriptor);
$data = (string) $xml->ds:Signature[0]->ds:KeyInfo->ds:X509Data->ds:X509Certificate.
答案 0 :(得分:-1)
http://www.php.net/manual/en/simplexmlelement.children.php
$childNode = $idp_xml->IDPSSODescriptor->children();