// Create XML structure
resources.LANGUAGES_XML.read();
var languages = resources.LANGUAGES_XML.getDocument("languages");
if(languages != null)
{
//append another language
var languageXml = new XML(languages);
var languages = languageXml.languages;
var groovy = "Groovy";
//add Groovy to list of languages
languages.appendChild({@code }{groovy}{@code });
resources.LANGUAGES_XML.write();
}
Further documentation.
Javascript example: