protected function loadXMLfromDB(&$data)
    {
        $this->validateParameters();

        $query = "SELECT " . $this->settings_column . " FROM " . $this->settings_table;
        
        if (!$this->dbworker->execute_query($query)) {
            throw new \Exception($this->dbworker->get_last_error() . "\n\n" . $this->dbworker->get_last_query(), "system_error");
        }
        
        $xml = "";
        
        if ($this->dbworker->fetch_row()) {
            $xml = $this->dbworker->field_by_name($this->settings_column);
        }
        
        $this->dbworker->free_result();
        
        if (empty($xml)) {
            return true;
        }
        
        $xmldoc = new \DOMDocument();
        
        if (!@$xmldoc->loadXML($xml)) {
            return false;
        }
        
        dom_to_array($xmldoc->documentElement, $data);
        
        return true;
    }