iTech College - Internet Technology, Online Education, E-Learning, Technician Training, Tech Tutorials, Distance Education, Virtual Learning XML Course: XMLHttpRequest Object (2) - www.itechcollege.com XML Course: XMLHttpRequest Object (2) - www.itechcollege.com
Free Courses
HTML
JavaScript
CSS
ASP
PHP
JSP
C++
ASP.NET
SQL
AJAX
FTP
XML

courses > XML > XMLHttpRequest Object (2)

XMLHttpRequest Object (2)

Let's use an example to demonstrate a small XML application built with HTML and Javascript

Look at the following XML document (book_catalog.xml):

<?xml version="1.0" encoding="ISO-8859-1"?>
<CATALOG>
<BOOK>
<TITLE>GIS for Web Developers: Adding 'Where' to Your Web Applications</TITLE>
<AUTHOR>Scott Davis</AUTHOR>
<LINK>http://www.selectagps.com/GIS-for-Web-Developers--d_0974514098.html</LINK>
<PRICE>34.95</PRICE>
</BOOK>
.
.
... more ...
.

To load the XML document (book_catalog.xml):

var xmlDoc;
if (window.ActiveXObject)
{// code for IE
xmlDoc=new ActiveXObject("Microsoft.XMLDOM");
}
else if (document.implementation.createDocument)
{// code for Firefox, Mozilla, Opera, etc.
xmlDoc=document.implementation.createDocument("","",null);
}
else
{
alert('Error!');
}
xmlDoc.async=false;
xmlDoc.load("book_catalog.xml");

After the execution of this code, xmlDoc is an XML DOM object, accessible by Javascript.



  Back to Index Page
 Next Page:  

XML Introduction
XML Format and Structure
XML Elements
XML Attributes
XML Syntax 1
XML Syntax 2
XML Naming Rules and Practices
XML Using CDATA for Dealing with HTML Tags
Displaying XML into HTML
XML Parser
XML DOM
XMLHttpRequest Object 1
XMLHttpRequest Object 2
XMLHttpRequest Object 3
Create an XML File From a Database 1
Create an XML File From a Database 2
Save XML File on Server


Online Education, Online Training for Your Job, Distance Education, E-learning Programs for Your Career!Online Colleges, Online Universities, E-learning & Distance Education for Your Career! Easy Job Training & Online Courses.


   Email A Friend  
 
Earn Online Degree
for Your Job
I found a job after I earned an online degree!
Online classes for finding a Job. Online College, Online University, Degrees, E-learning school, online certificate Earn your
online degree now!
Online Training
for Good Job
Why I work so hard but earn so little? Why I cannot find a high paying job?
Online training for a Good Jobs. Online Degree, E-learning school, online certificate Go to
online school now!

Copyright ©2024, itechcollege.com. All rights reserved
iTechCollege | About iTech | Contact iTech