What is the best way to read xml data in php?

I’m a newbie 17 year old developer currently working at my internship project that consists into generating a PDF structure using PHP and TCPDF.
I’m having some issues reading the data from the xml file to display on the PDF structure. Here is a sample of the code I’ve tried:

$getfile = file_get_contents("ident.xml");
if ($getfile == FALSE)
{
    die('Failed to read.');
}
$arr = simplexml_load_string($getfile);
foreach ($arr->PromIdent as $d)
{
    $pdf->MultiCell(140, 10, $d,1,'L',false,1,'80','25',true,0,false,true,10,'B',false);
    $pdf->MultiCell(140, 10, $d['email'],1,'L',false,1,'80','25',true,0,false,true,10,'B',false);
}

That is my first time working with PHP and XML aswell, so be kind 🙂