src/Mbcraft/Piol/Utils/JavaXmlPropertiesUtils.php
public static function saveToString($properties) {
        $xn = new \SimpleXMLElement(self::XML_ROOT_OPEN.self::XML_ROOT_CLOSE,LIBXML_NOXMLDECL);
            
        foreach ($properties as $key => $value) {
            $xn->addChild("entry", htmlspecialchars($value,ENT_XML1))->addAttribute("key",htmlspecialchars($key,ENT_XML1));
        }
        //LIBXML_NOXMLDECL is not supported, so replace the xml declaration to include also the dtd
        return preg_replace('/\<\?.*\?\>/', self::XML_PRELUDE, $xn->asXML());
        
    }
public static function saveToString($properties) {
        $xn = new \SimpleXMLElement(self::XML_ROOT_OPEN.self::XML_ROOT_CLOSE,LIBXML_NOXMLDECL);
            
        foreach ($properties as $key => $value) {
            $xn->addChild("entry", htmlspecialchars($value,ENT_XML1))->addAttribute("key",htmlspecialchars($key,ENT_XML1));
        }
        //LIBXML_NOXMLDECL is not supported, so replace the xml declaration to include also the dtd
        return preg_replace('/\<\?.*\?\>/', self::XML_PRELUDE, $xn->asXML());
        
    }
Saves the properties to a string.

@param array $properties The properties, as an array.

@return string the string containing the properties in xml java properties format.

@api