
function viewXml() {
	var root= xmlDoc0600.documentElement;
	html = "";

	if (root != null) {
		for(var i = 0; i < root.childNodes.length; i++) {
			if (root.childNodes.item(i).nodeName == "DESC") {
				html = html +"<p>"+ root.childNodes.item(i).childNodes.item(0).nodeValue +"</p>";
			}
			if (root.childNodes.item(i).nodeName == "CATEGORY") {
				CATEGORY = root.childNodes.item(i);
				for(var j = 0; j < CATEGORY.childNodes.length; j++) {
					if (CATEGORY.childNodes.item(j).nodeName == "TITLE" && CATEGORY.childNodes.item(j).childNodes.length > 0) html = html +"<strong>"+ CATEGORY.childNodes.item(j).childNodes.item(0).nodeValue +"</strong><br><br>";
					if (CATEGORY.childNodes.item(j).nodeName == "DESC" && CATEGORY.childNodes.item(j).childNodes.length > 0) html = html +"<p>"+ CATEGORY.childNodes.item(j).childNodes.item(0).nodeValue +"</p>";

					if (CATEGORY.childNodes.item(j).nodeName == "SUB") {
						SUB = CATEGORY.childNodes.item(j);
						for(var k = 0; k < SUB.childNodes.length; k++) {
							if (SUB.childNodes.item(k).nodeName == "TITLE" && SUB.childNodes.item(k).childNodes.length > 0) html = html +"<strong>"+ SUB.childNodes.item(k).childNodes.item(0).nodeValue +"</strong><br><br>";
							if (SUB.childNodes.item(k).nodeName == "DESC" && SUB.childNodes.item(k).childNodes.length > 0) html = html +"<p>"+ SUB.childNodes.item(k).childNodes.item(0).nodeValue +"</p>";
						}
					}
				}
			}
		}
		html = ReplaceStr(html, "\n", "<br>");
		xmlCtnt.innerHTML = html;
	}
}

function ReplaceStr(str,str1,str2) {
	var chkstr = str;

	tmpstr = ""

	if (chkstr == "" ){
		return chkstr;
	}

	// str1 À» str2 ·Î ¹Ù²Ù±â
	for (var i = 0; i < chkstr.length; i++){
		if (chkstr.charAt(i) == str1){
			tmpstr = tmpstr + str2
		}else{
			tmpstr = tmpstr + chkstr.charAt(i)
		}
	}

	return tmpstr;
}
