private function getFirstElement() { foreach ($this->_nodes as $node) { if ($node instanceof \DOMElement) { return $node; } } return NULL; }