api - extension attributes spaces not escaped in xml

New Contributor


I am writing a process tool for a help desk using casper and other tools, we have a lot of attributes created for devices but im having trouble with getting xml details a lot of the names have spaces like "ASSET LOAN - LOAN START DATE"

The xml response doe not escape these spaces so im not able to all it in the same way as I normally would.

Im using php and simplexml, so my call looks like this:

$pickedup = $xml->extension_attributes->extension_attribute->ASSET LOAN - GUARANTOR EMAIL

But obviously the spaces will be incorrect. Is there any way to force the api to escape the element names to make them safe?

Or can anyone suggest a better way to call them?



Contributor II

Are you able to wrap it in double quotes and it still work? I don't have experience with simplexml and don't have access to testing php right now