
//
function XDoc_GetValue(xmlDoc,tagName) {
	var tagValue = "";
	try {
		tagValue = xmlDoc.getElementsByTagName(tagName)[0].childNodes[0].nodeValue;
	} catch(err) {
		// do nothing
	}
	return tagValue;
}

//
function XDoc_ToArray(xmlDoc) {
	//
	var arr_elements = new Array();
	//
	arr_elements["registration"] = new Array();
	arr_elements["registration"]["status"] = XDoc_GetValue(xmlDoc,"status");
	arr_elements["registration"]["notice"] = XDoc_GetValue(xmlDoc,"notice");
	//
	arr_elements["registration"]["error"] = new Array();
	arr_elements["registration"]["error"]["type_desc"] = XDoc_GetValue(xmlDoc,"type_desc");
	arr_elements["registration"]["error"]["err_username"] = XDoc_GetValue(xmlDoc,"err_username");
	arr_elements["registration"]["error"]["err_email"] = XDoc_GetValue(xmlDoc,"err_email");
	//
	return arr_elements;
}

