Hello,
You can iterate the DOMNodeList object ('elements' key) to get each element (including XML tags):
foreach ($queryInfo['elements'] as $element) {
...
}
DOMNodeList is a PHP DOM object: https://www.php.net/manual/en/class.domnodelist.php, so you can use all PHP DOM methods (https://www.php.net/manual/en/book.dom.php) to get XML strings, query tags, get attributes...
Regards.