I have a Soap API to call from a PHP code. I am having trouble converting it to array. I have searched many questions on Stackoverflow & google as well, but was not helpful enough.
I am facing problem when converting the following into array.
<objects>
<ABCnxtObj>
xsi:type="api:Lead"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<Key>702144</Key>
<Custom>
<BusinessName>9<BusinessName>
</Custom>
</ABCnxtObj>
</objects>
I am converting this to the following array:
$objects = [
'ABCnxtObj' => [
'Key' => 702144,
'Custom' => [
'BusinessName' => 9
]
]
];
The problem here is I am not able to put the xsi:type & xmlns:xsi attributes. Can anyone explain me, on how do I pass these values in my array.
Or if there is another way of doing this.
Thanks!