I have this XML file :
Code: Select all
<menu>
<game name="Sega Mega Drive"/>
<game name="Capcom Play System"/>
<game name="Capcom Play System 2"/>
<game name="Capcom Play System 3"/>
</menu>
I know how to read the XML File:
Code: Select all
FileRead, xmldata, %A_ScriptDir%\DataBases\Main Menu\Main Menu.xml ; Set xmldata to contents of file
doc := ComObjCreate("MSXML2.DOMDocument.6.0")
doc.async := false
doc.loadXML(xmldata)
DocNode := doc.selectSingleNode("//menu/game").getAttribute("name")
Code: Select all
doc.save(A_ScriptDir . "\DataBases\Main Menu\Main Menu.xml ")