Loading from string
Use simplexml_load_string to create a SimpleXMLElement from a string:
$xmlString = "<?xml version='1.0' encoding='UTF-8'?>";
$xml = simplexml_load_string($xmlString) or die("Error: Cannot create object");
Note that or not || must be used here becau...