1
function XMLMODULE(div, root_node) {
2
if (typeof div == "object") this.div = div;
4
this.div = document.getElementById(div);
5
if (!this.div) adei.ReportError(translate("Element \"%s\" is not present in current document model", div));
8
if (typeof root_node == "undefined") this.root_node = this.div;
9
else if (typeof root_node == "object") this.root_node = root_node;
10
else this.root_node = document.getElementById(root_node);
13
XMLMODULE.prototype.Update = function(json, forced) {
14
if ((json.xml)&&(json.xslt)) {
15
adei.UpdateDIV(this.div, json.xml, json.xslt);
16
adei.SetSuccessStatus(translate("Done"));
18
adei.SetStatus(translate("Update failed: Incomplete response received by Alarms module"));
22
XMLMODULE.prototype.GetNode = function() {
23
return this.root_node;