This method sets the attributes value. If the attribute already exists it changes the value. Otherwise the attribute is created and the value is set.
var factory = shell.serviceManager.maxiXML.factory;
var dom = factory.createDOMDocumentFromPath("c:\\document.xml", false);
var element = dom.documentElement;
if(element)
element.setAttribute("width", "40px");