I am trying to read the value of location
in the following xml:
<service name="xyz">
<documentation>gSOAP 2.7.11 generated service definition</documentation>
<port name="xyz" binding="tns:xyz">
<SOAP:address location="http://192.168.0.222:8092"/>
</port>
</service>
I am trying to reach SOAP:address
tag but unable to:
$wsdlFile = file_get_contents('./wyz.wsdl');
if($wsdlFile) {
$xml = simplexml_load_string($wsdlFile);
foreach( $xml->service->documentation->port->attributes() as $a => $b) {
echo $a . '-' . $b;
}
}
How could I get the value of location
?