ok. i would like to know how to enable and disable a button via xml. this is my code. please help. thanks in advance.

Code:
if (worksList[cp].attributes.button = "true"){
    button.enabled = true;
}else if (worksList[cp].attributes.button = "false"){
    Button.enabled = false;
}