<?php
    $xmlBody = "<?xml version='1.0' encoding='UTF-8'?>
    <locations>
        <city1>New York</city1>
        <city2>Los Angeles</city2>
        <city3>Chicago</city3>
    </locations>";
    
    $xml = simplexml_load_string($xmlBody) or die("Cannot create XML object!");
    print_r($xml);
?>