I am trying to get tags-wise values from the given XML, like the Location
tags value using PHP/CakePHP 3.4, for that, I have tried the below ways.
file_get_contents
with try 1, it returns the below response
simplexml_load_file
with this, it returns like below response
both ways are not working for my requirement.
below xml is from OKTA while i am creating application for SAML.
`
<?xml version="1.0" encoding="UTF-8"?>
<md:EntityDescriptor entityID="http://www.okta.com/exk76e6px5L1vxn4w5d7" xmlns:md="urn:oasis:names:tc:SAML:2.0:metadata">
<md:IDPSSODescriptor WantAuthnRequestsSigned="false" protocolSupportEnumeration="urn:oasis:names:tc:SAML:2.0:protocol">
<md:KeyDescriptor use="signing">
<ds:KeyInfo xmlns:ds="http://www.w3.org/2000/09/xmldsig#">
<ds:X509Data>
<ds:X509Certificate>other details comes here..</ds:X509Certificate>
</ds:X509Data>
</ds:KeyInfo>
</md:KeyDescriptor>
<md:NameIDFormat>urn:oasis:names:tc:SAML:1.1:nameid-format:emailAddress</md:NameIDFormat>
<md:SingleSignOnService Binding="urn:oasis:names:tc:SAML:2.0:bindings:HTTP-POST" Location="https://dev-57378204.okta.com/app/dev-57378204_saml20_1/e123456/sso/saml" />
<md:SingleSignOnService Binding="urn:oasis:names:tc:SAML:2.0:bindings:HTTP-Redirect" Location="https://dev-57378204.okta.com/app/dev-57378204_saml20_1/e123456/sso/saml" />
</md:IDPSSODescriptor>
</md:EntityDescriptor>
`
any suggestion to get data from XML ?