XMLA (or XML for Analysis) is based on Microsofts Analysis Services Scripting Language. For full reference of this click here.
To add a new XMLA script, right click an SSAS database Module in the navigator, and select New Script. If a script already is added to a Module, right click the Script Folder node instead.
From the Add dialog, select Add Empty and click Next.
Enter a Name and select XMLA as Type. Optionally add a description and click Finish.
Select the new script from the Navigator.
Select Script Command section. This is where you can put the XML script. You can:
A script can be associated to processing tasks of the SSAS Module. Select the SSAS Module from the Navigator.
From the Script Extensions section, you can select a script in the right section and click Add (or double click the script).
You must then tell when to execute the added script. The Execute When dropdown has a set of predefined places in task execution (click here for options) where the script can execute.
Also you can Enable/Disable it, and select Stop/Continue the rest of the tasks it the script fails.
Alternately, you can add the script in a Dataflow by adding an XMLA Step and select the script.