I find that XML is still harder to deal with programmatic than JSON, so loads of my code codes

libxml_use_internal_errors(true);
$simpleXml = simplexml_load_string($fileContents);
return json_encode($simpleXml);

So I can json_decode it back to an object. XML has so much redundancy with it’s close tags and padding-with-spaces!