load("/var/www/halo-battle/onyx2/config/root.xml"); $xml->formatOutput = true; $xml_configs = $xml->createElement("configs"); $xml_configs->setAttribute("active", true); $xml_configs->setAttribute("root", __DIR__.'/'); $xml_configs->setAttribute("cache", true); $xml_config = $xml->createElement("config"); $xml_config->setAttribute("match", '*'); $xml_var = $xml->createElement("var", "Béta #1"); $xml_var->setAttribute("name", 'serveur_name'); $xml_config->appendChild($xml_var); $xml_var = $xml->createElement("var", "Béta #1"); $xml_var->setAttribute("name", 'serveur_name'); $xml_config->appendChild($xml_var); $xml_configs->appendChild($xml_config); $xml->appendChild($xml_configs); print $xml->saveXML(); ?>