src/Mbcraft/Piol/Utils/JavaXmlPropertiesUtils.php
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;
    }
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;
    }
Reads the properties from a string.

@param string $string The string, in xml java properties format.

@return array The properties array

@api