query($tbranch); $conceptIds = []; foreach ($nodeList as $node) { if ($node->hasAttribute('id')) { $conceptIds[] = $node->getAttribute('id'); } } } }