Home »
Imported messages »
comp.lang.php »
How to extract value using php soapclient
How to extract value using php soapclient [message #173756] |
Tue, 03 May 2011 08:49 |
ofuuzo
Messages: 1 Registered: May 2011
Karma:
|
Junior Member |
|
|
Hi,
I have just started learning to program with PHP SOAPclient. I have
the following xml file and I want to extract/get the value
rs-1304338811289-11595:
- <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/
envelope/">
- <soap:Body>
- <ns2:deliverMDRecordsResponse xmlns:ns2="http://
mdstore.data.dnetlib.eu/" xmlns:ns3="http://www.w3.org/2005/08/
addressing">
- <return>
<ns3:Address>http://129.70.212.20:8282/dnet-mdstore/
services/MDStoreResultSet</ns3:Address>
- <ns3:ReferenceParameters>
<ResourceIdentifier:ResourceIdentifier
xmlns:ResourceIdentifier="http://www.driver.org" xmlns:wsa="http://
www.w3.org/2005/08/addressing">rs-1304338811289-11595</ResourceIdentifier:ResourceIdentifier >
</ns3:ReferenceParameters>
-......
</return>
</ns2:deliverMDRecordsResponse>
</soap:Body>
</soap:Envelope>
My php script that is not working:
<?php
$source = 'resourceIdentifier.xml';
$xml = simplexml_load_string($source);
$xml->registerXPathNamespace('identifier', 'ns3');
foreach ($xml->xpath('//identifier:ResourceIdentifier') as $item)
{
print_r($item);
}
?>
I need help and thanks in advance.
- Ofuuzo
|
|
|
Goto Forum:
Current Time: Tue Nov 26 23:06:25 GMT 2024
Total time taken to generate the page: 0.03836 seconds