private function loadTag(\DOMXPath $xpath, \DOMNode $node)
{
$tag = ['name' => null, 'priority' => null, 'attributes' => []];
foreach ($node->attributes as $key => $attr) {
if (in_array($key, ['name', 'priority'])) {
$tag[$key] = $attr->value;
} else {
$tag['attributes'][$key] = $attr->value;
}
}
return $tag;
}