function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
AmigoAmigo 

Salesforce Outbound Message parsed by SimpleXML in PHP

Hi,

I write a post to parse the filed value in a Salesforce outbound message.

 

To simplified, I save the Salesforce outbound message in XML file. It shall help you to focus on how to parse the XML with namespace by SimpleXML in PHP.

 

You will need children and the right syntax to get the field value. Here is an example:

 

$rcXML->children('http://schemas.xmlsoap.org/soap/envelope/')->Body->children('http://soap.sforce.com/2005/09/outbound')->notifications->Notification->sObject->children('urn:sobject.enterprise.soap.sforce.com')->CreatedDate

 

A more detail explain on children and full list of sample xml and PHP code is here:

 

Parse XML with namespace by SimpleXML in PHP

 

Wish it could save your time!

Best regards,

 

Amigo

TUCAN ITTUCAN IT
Thank you mate.