public static function readFromString($string) {

        $xml = new \DOMDocument();
        $xml->loadXML($string);

        $result = [];

        $props = $xml->childNodes->item($xml->childNodes->length-1)->childNodes;
        
        for ($i=0; $i<$props->length;$i++) {
            $entry = $props->item($i);
            if ($entry->nodeName=="entry")
                $result[$entry->attributes->getNamedItem("key")->nodeValue] = $entry->textContent;
        }
        
        return $result;
    }