Alice
alice@example.com
id="1") and element content — two distinct data types$xml = simplexml_load_string($xmlString);
echo $xml->user[0]->name; // Alice
// Or via DOM
$dom = new DOMDocument();
$dom->loadXML($xmlString);
$nodes = $dom->getElementsByTagName('name');