Click to See Complete Forum and Search --> : As a Database using XML


mcxfever
August 10th, 2011, 06:56 AM
You can use XML as a database. Its take less server load and use to easy.

The HTML DOM
<html>
<body>
<h1>W3Schools Internal Note</h1>
<div>
<b>To:</b> <span id="to"></span><br />
<b>From:</b> <span id="from"></span><br />
<b>Message:</b> <span id="message"></span>
</div>

<script type="text/javascript">
if (window.XMLHttpRequest)
{// code for IE7+, Firefox, Chrome, Opera, Safari
xmlhttp=new XMLHttpRequest();
}
else
{// code for IE6, IE5
xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
}
xmlhttp.open("GET","note.xml",false);
xmlhttp.send();
xmlDoc=xmlhttp.responseXML;

document.getElementById("to").innerHTML=
xmlDoc.getElementsByTagName("to")[0].childNodes[0].nodeValue;
document.getElementById("from").innerHTML=
xmlDoc.getElementsByTagName("from")[0].childNodes[0].nodeValue;
document.getElementById("message").innerHTML=
xmlDoc.getElementsByTagName("body")[0].childNodes[0].nodeValue;
</script>

</body>
</html>


sure shot share tips (http://sonictrades.com/sureshot-intraday-stock-tips/) || stock tips free trial (http://sonictrades.com/share-tips-intraday-trading-stock-market-nifty-option-tips-free-trial/)

Chris_F
August 14th, 2011, 06:24 PM
Thanks for the tip?

But no, seriously, what is the point of this post?


Its take less server load


You have some empirical data to prove this?

Your code example is AJAX, and I'd like to point out that JSON is a vastly superior format to XML for this sort of work.