<?php
use Laminas\Dom\Document;
use Laminas\Dom\Document\Query;
$file = __DIR__ . '/test.xml';
$doc = new Document(file_get_contents($file));
$title = Query::execute('/catalog/book[2]/title', $doc);
$desc = Query::execute('/catalog/book[2]/description', $doc);
echo sprintf(
'<b>%s</b> - %s',
$title[0]->textContent,
$desc[0]->textContent
);