Infopath 2003 – adding an attribute through code

BronwenWeeGo.jpgTo add an attribute by code in Infopath:

 

 
            IXMLDOMNode expressionBox= _document.DOM.selectSingleNode("//someNode");
            IXMLDOMNode disableEditing;
            node2 = _document.DOM.createAttribute("disableEditing");
            node2.text = "yes";
            addressNode.attributes.setNamedItem(node2);