private function getAttributes(\DOMElement $node) { $result = []; foreach ($node->attributes as $name => $attribute) { $result[$name] = $this->getValue($attribute->value); } return $result; }