function Xml(rootNodeName) {
	try { 
		this.xml = new ActiveXObject("Microsoft.XMLDOM"); 
	} catch(e) {
		alert('Unable to spawn XML object');
		return;
	}		
	this.root = this.xml.createElement(rootNodeName ? rootNodeName : 'root');
	this.xml.appendChild(this.root);
}

Xml.prototype.Set = function(nodeName, nodeValue) {
	var node = this.xml.createElement(nodeName);
	if (node) {
		node.text = nodeValue;
		this.root.appendChild(node);
	}
}

Xml.prototype.InsertXml = function(newXml) {
	this.root.appendChild(newXml.GetRootNode());
}


Xml.prototype.GetXml = function() {
	return this.xml.xml;
}

Xml.prototype.GetRootNode = function() { 
	return this.root;
}