code: function (ui, opts) {
      
  		log("xxmlmirror.init");
  
  		var $el = $(ui);
  		var state = ($("div.xmlmirrorstate:first", $el).html() || "").trim();
  		opts = $.extend({ defaultScript: state }, opts);
  
  		$el.html(template.trim());
  
  		var editor = null;
  		(function iframeImplementation() {
  			var iframe = $("iframe", ui);
  
  			editor = ns.widgets.xmleditorInitIframe(iframe);
  
  		})();
  
  		if (opts.defaultScript) {
  			editor.set(ns.modules.string.htmlDecode(opts.defaultScript));
  		}
  
  		var me = {};
  		me.refresh = function () { editor.refresh(); };
  		me.getXml = function () {
  			var code = editor.get();
  			return code;
  		};
  		me.setXml = function (xml) {
  			editor.set(xml);
  		};
  
  		return me;
  	}
docs: var error = tracing.error;