After spending SEVERAL frustrated hours on this I am asking for your help.
I am trying to get the content of particular nodes from a SOAP response.
The resp
You have to use SimpleXMLElement::children(), though at this point it would probably be easier to use XPath.
24
The+client+order+number+3002254+is+already+in+use
1
Aborting
XML;
$XmlArray = new SimpleXMLElement($XmlStr);
$t = $XmlArray->children("env", true)->Body->
children("ns1", true)->PlaceOrderResponse->
children()->ErrorArray->Error;
foreach ($t as $error) {
echo $error->ErrorCode, " " , $error->ErrorText, "
";
}
gives:
24 The+client+order+number+3002254+is+already+in+use 1 Aborting