FUDforum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » Imported messages » comp.lang.php » How to extract value using php soapclient
Show: Today's Messages :: Polls :: Message Navigator
Return to the default flat view Create a new topic Submit Reply
How to extract value using php soapclient [message #173756] Tue, 03 May 2011 08:49 Go to previous message
ofuuzo is currently offline  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
[Message index]
 
Read Message
Read Message
Previous Topic: What are the directories/files who php needs?
Next Topic: preg_replace help
Goto Forum:
  

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ]

Current Time: Wed Nov 27 01:38:17 GMT 2024

Total time taken to generate the page: 0.04122 seconds