Hi before be telling about AJAX and XML Let be tell u what is XML .XML stands for Extensible Markup Language which is an International standards of data exchange .Briefly when a server sends any data to client it actually the XML data coming from server to client and the browser which acts as an interpreter interprets all the XML tags into human readable format which is XSLT.
AJAX-XML.html
<html>
<head>
<title>Using Ajax and XML</title>
<script language = “javascript”>
function getGuest()
{
var xhr;
if (window.ActiveXObject)
{
xhr = new ActiveXObject(”Microsoft.XMLHTTP”);
}
else if (window.XMLHttpRequest)
{
xhr = new XMLHttpRequest();
xhr.overrideMimeType(”text/xml”);
}
xhr.onreadystatechange = function()
{
if (xhr.readyState == 4 && xhr.status == 200)
{
var xmlDocument = xhr.responseXML;
removeWhitespace(xmlDocument);
displayGuest(xmlDocument);
}
}
xhr.open(”GET”, “students.xml”, true);
xhr.send(null);
}
function displayGuest (xmldoc)
{
var eventsNode, eventNode, peopleNode;
var firstNameNode, lastNameNode, displayText;
//This goes to inventory Node
eventsNode = xmldoc.documentElement;
eventNode = eventsNode.firstChild;<!–here the actuall code lies here the firstchild will refer to computer science –>
peopleNode = eventNode.firstChild;<!–Same as Above–>
personNode = peopleNode.firstChild;
alert(personNode.firstChild.nodeValue);
displayText = “The Luckypersonis ” + personNode.firstChild.nodeValue;
var target = document.getElementById(”targetDiv”);
target.innerHTML=displayText;
}
function removeWhitespace(xml)
{
var loopIndex;
for (loopIndex = 0; loopIndex < xml.childNodes.length;loopIndex++)
{
var currentNode = xml.childNodes[loopIndex];
if (currentNode.nodeType == 1) {
removeWhitespace(currentNode);
}
if (((/^s+$/.test(currentNode.nodeValue))) &&
(currentNode.nodeType == 3)) {
xml.removeChild(xml.childNodes[loopIndex--]);
}
}
}
</script>
</head>
<body>
<h1>Using Ajax and XML</h1>
<form>
<input type = “button” value = “Get the tech guy”
onclick = “getGuest()”>
</form>
<div id=”targetDiv” width =100 height=100>
Who is the Techi???????????
</div>
</body>
</html>
Students.xml
<?xml version=”1.0″?>
<students>
<computerscience>
<section-A>
<student1>Naveen</student1>
<student2>Niraj</student>
</section-A>
<section-B>
<student1>Radhesh</student1>
<student2>Rakesh</student>
</section-B>
</computerscience>
<electronics>
<section-A>
<student1>Balraj</student1>
<student2>Parthu</student>
</section-A>
</electronics>
</students>
Related Stuff
-
MooV: Using cutting edge Video phones and Software Video Phones - coupling all that with VoIP and empowering the disabled.
-
Moo Telecom: VoIP communications made easy - Ring anyway with the fun and ease of using a normal phone
-
TagR:Mobile Social Network with Real Time Locations Based services, and Ambience Intelligence, VoiP, IM, Skype, Googletalk, Mapping, Flickr, Events, Calendaring, Scheduling, SecondLife Support
-
ClearSMS : ClearSMS is a Web-based application that lets you send bulk SMS messages to your customers, contacts, or just about anyone.
-
Jajah:jah is a VoIP (Voice over IP) provider, founded by Austrians Roman Scharf and Daniel Mattes in 2005[1]. The Jajah headquarters are located in Mountain View, CA, USA, and Luxembourg. Jajah maintains a development centre in Israel.
-
Skype: It’s free to download and free to call other people on Skype. Skype the number one voice over ip software
- PrivatePhone: a free local phone number with voicemail and messages you can check online or from any phone.

Original Source: