I'm making an API call and the response is giving me XML:
<custom_column name="field1"/>
<custom_column name="field2"/>
<custom_column name="Age>23</custom_column>
So in the response, the only element that has a value is the elemnt where name="Age".
When I turn that XML into an object via simplexml_load_string($strXML), I get the following:
[7] => SimpleXMLElement Object
(
[@attributes] => Array
(
[name] => field1
)
)
[8] => SimpleXMLElement Object
(
[@attributes] => Array
(
[name] => field2
)
)
[9] => 23
The @attributes are getting stripped only when there is a value present inside the element.
This is not what I'm after because I'm creating a sync between two platforms and have no field name to leverage in the mapping process with what is being returned.