SimpleXML and PHP

I have only just discovered SimpleXML, and have a beginners question.

Using ZOO for Joomla, my text items within an article are in an XML format and look similar to that below.

‘<text identifier=“ba49b82b-a0af-4c1e-9c85-cfaaaaae763f”>
<value><![CDATA[12345]]></value>
</text>’

This content is stored in a field named ‘Elements’. I created the following to try and extract the information ‘12345’ from the first text identifier.

$result = @mysql_query (“SELECT id, elements FROM jos_zoo_item WHERE id=$count”);
if (mysql_num_rows($result) > 0)
{
while($row = mysql_fetch_array($result, MYSQL_ASSOC))
{
$xmlstring = $row[‘elements’];
$xml = new SimpleXMLElement($xmlstring);
echo $xml->identifier[0]->value;
}
}

Sadly this returns no text. What have I done wrong?

Thanks, Alec