SlideShare a Scribd company logo
Ayes Chinmay
Internet
&
Web Technology
(XML and AJAX)
IWT Syllabus:
Module 3:
XML
Introduction to XML, XML vs HTML, Structures of a XML Document, Document Type Declaration (DTD),
XML Validation, Well Formed XML Documents, Valid XML Document, XML DOM, XSL, XSL ransformation,
XML Namespaces, XML Schema.
AJAX
AJAX Introduction, AJAX - The XMLHttpRequest Object, AJAX - Server Response, Ajax XML,
Ajax Database
jQuery
jQuery DOM Selectors, HTML Content, jQuery CSS Styles, jQuery HTML DOM
JSON
Introduction, syntax, Data Types, Parsing, Stringify, Object, Arrays
React.js
Introduction, ES6, Render HTML, JSX, Components , props, state, Lifecycle, Events, forms,
CSS
HTML vs XML:
No. HTML XML
1
HTML is used to display data and
focuses on how data looks.
XML is a software and hardware independent
tool used to transport and store data. It
focuses on what data is.
2 HTML is a markup language itself.
XML provides a framework to define markup
languages.
3 HTML is not case sensitive. XML is case sensitive.
4 HTML is a presentation language.
XML is neither a presentation language nor a
programming language.
5 HTML has its own predefined tags. You can define tags according to your need.
6
In HTML, it is not necessary to use a
closing tag.
XML makes it mandatory to use a closing tag.
7
HTML is static because it is used to
display data.
XML is dynamic because it is used to transport
data.
8 HTML does not preserve whitespaces. XML preserve whitespaces.
XML:
 XML (eXtensible Markup Language) is a mark up language.
 XML is designed to store and transport data.
 Xml was released in late 90’s. it was created to provide an easy to
use and store self describing data.
 XML became a W3C Recommendation on February 10, 1998.
 XML is not a replacement for HTML.
 XML is designed to be self-descriptive.
 XML is designed to carry data, not to display data.
 XML tags are not predefined. You must define your own tags.
 XML is platform independent and language independent.
Advantage XML:
1. Defining your own elements
2. Better organized documents
3. Sorting of database
XML DOM:
<?xml version="1.0" encoding="UTF-8"?>
<bookstore>
<book category="cooking">
<title lang="en">Everyday Italian</title>
<author>Giada De Laurentiis</author>
<year>2005</year>
<price>30.00</price>
</book>
<book category="children">
<title lang="en">Harry Potter</title>
<author>J K. Rowling</author>
<year>2005</year>
<price>29.99</price>
</book>
<book category="web">
<title lang="en">Learning XML</title>
<author>Erik T. Ray</author>
<year>2003</year>
<price>39.95</price>
</book>
</bookstore>
<root>
<child>
<subchild>.....</subchild>
</child>
</root>
XML - Parsers:
 XML parser is a software library or a package that provides interface for client
applications to work with XML documents.
 It checks for proper format of the XML document and may also validate the XML
documents.
 Modern day browsers have built-in XML parsers.
AJAX:
 Full Form of AJAX is Asynchronous JavaScript And XML.
 AJAX is not a programming language.
 AJAX just uses a combination of:
a) A browser built-in XMLHttpRequest object (to request data
from a web server)
b) JavaScript and HTML DOM (to display or use the data)
How AJAX works ?
1. An event occurs in a web page (the page is loaded, a button
is clicked)
2. An XMLHttpRequest object is created by JavaScript
3. The XMLHttpRequest object sends a request to a web
server
4. The server processes the request
5. The server sends a response back to the web page
6. The response is read by JavaScript
7. Proper action (like page update) is performed by JavaScript
XMLHttpRequest Object:
<!DOCTYPE html>
<html>
<body>
<h1>The XMLHttpRequest Object</h1>
<p id="demo">Let AJAX change this text.</p>
<button type="button"
onclick="loadDoc()">Change Content</button>
<script>
function loadDoc() {
var xhttp = new XMLHttpRequest();
xhttp.onreadystatechange = function() {
if (this.readyState == 4 && this.status == 200) {
document.getElementById("demo").innerHTML = this.responseText;
}
};
xhttp.open("GET", “test.txt", true);
xhttp.send();
}
</script>
</body>
</html>
Send a Request To a Server:
Method Description
open(method, url, async)
Specifies the type of request
method: the type of request: GET or POST
url: the server (file) location
async: true (asynchronous) or false (synchronous)
send() Sends the request to the server (used for GET)
send(string) Sends the request to the server (used for POST)
Server Response:
Property Description
onreadystatechange
Defines a function to be called when the readyState property
changes
readyState
Holds the status of the XMLHttpRequest.
0: request not initialized
1: server connection established
2: request received
3: processing request
4: request finished and response is ready
status
200: "OK"
403: "Forbidden"
404: "Page not found"
statusText Returns the status-text (e.g. "OK" or "Not Found")
Access XML File:
DEMO
Model Questions:
1. XML uses
(a) user-defined tags. (b) pre-defined tags.
(c) extensible tags. (d) pairing tags.
2. The advantages of XML over HTML are:
A. It allows processing of data stored in Web pages.
B. It uses meaningful tags which aids in understanding the nature of a
document.
C. Is simpler than HTML.
D. It separates presentation and structure of document.
(a) A, B and C only (b) A, C and D only
(c) A, B and D only (d) B and D only
Model Questions: (Cont.)
3. What does XML stand for?
(a) Exclusive modern links
(b) Extensible markup language
(c) Extra memory links
(d) Exit markup language
4. To declare the version of XML, the correct syntax is.
(a) <?xml version=’1.0’/>
(b) <*xml version=’1.0’/>
(c) <?xml version="1.0"/>
(d) </xml version=’1.0’/>
Next Class:
JQuery and JSON

More Related Content

What's hot (20)

PPTX
Dom
Surinder Kaur
 
PPTX
INTRODUCTION TO DOM AND DOM TREE
systematiclab
 
PPTX
Dom(document object model)
Partnered Health
 
PPT
Document Object Model
yht4ever
 
PPTX
Introduction to the DOM
tharaa abu ashour
 
PPT
Document Object Model
chomas kandar
 
PPTX
Introduction to DOM
Daniel Bragais
 
PPTX
Dynamic HTML (DHTML)
Himanshu Kumar
 
PPT
DOM Quick Overview
Signure Technologies
 
PPT
introduction to the document object model- Dom chapter5
FLYMAN TECHNOLOGY LIMITED
 
PPTX
Document object model(dom)
rahul kundu
 
PPT
uptu web technology unit 2 Xml2
Abhishek Kesharwani
 
PPTX
Web Information Systems XML
Artificial Intelligence Institute at UofSC
 
PPTX
XML Document Object Model (DOM)
BOSS Webtech
 
PPTX
Hushang Gaikwad
Hushnag Gaikwad
 
PPTX
Document Object Model
Mayur Mudgal
 
PPTX
Web Information Systems Html and css
Artificial Intelligence Institute at UofSC
 
INTRODUCTION TO DOM AND DOM TREE
systematiclab
 
Dom(document object model)
Partnered Health
 
Document Object Model
yht4ever
 
Introduction to the DOM
tharaa abu ashour
 
Document Object Model
chomas kandar
 
Introduction to DOM
Daniel Bragais
 
Dynamic HTML (DHTML)
Himanshu Kumar
 
DOM Quick Overview
Signure Technologies
 
introduction to the document object model- Dom chapter5
FLYMAN TECHNOLOGY LIMITED
 
Document object model(dom)
rahul kundu
 
uptu web technology unit 2 Xml2
Abhishek Kesharwani
 
Web Information Systems XML
Artificial Intelligence Institute at UofSC
 
XML Document Object Model (DOM)
BOSS Webtech
 
Hushang Gaikwad
Hushnag Gaikwad
 
Document Object Model
Mayur Mudgal
 
Web Information Systems Html and css
Artificial Intelligence Institute at UofSC
 

Similar to Internet and Web Technology (CLASS-7) [XML and AJAX] | NIC/NIELIT Web Technology (20)

PPTX
HSHDGDGDHDYDUDUDUDHDHDHSHAHAHSHSBDHDHDHDHDHD
srlegaspi2101
 
PPTX
Web-Engineering-Lec-14 (1) .pptx
iamayesha2526
 
PPTX
Web-Engineering-Lec-14 (1 ).pptx
iamayesha2526
 
PPTX
GRADE 12 UNIT 4 computer science Ethiopian.pptx
ElanPuthukkudi
 
PDF
xml2cdvcx vnbm,azsdfghjkml;sxdfcgmndxfcgvhb nmfctgvbhjnm ,cfgvb nm,xc vb.pdf
kavigamage62
 
PPTX
BITM3730 10-31.pptx
MattMarino13
 
PPTX
BITM3730 10-18.pptx
MattMarino13
 
PPT
What is xml
Aneesa Rahman
 
DOCX
Xml material
prathap kumar
 
DOCX
Xml material
prathap kumar
 
DOCX
Xml material
xavier john
 
PPTX
Web data management (chapter-1)
Dhaval Asodariya
 
PPT
Xml nisha dwivedi
NIIT
 
PPTX
Introduction to XML
Abhra Basak
 
PPTX
xml and xhtml.pptx
ssusere16bd9
 
HSHDGDGDHDYDUDUDUDHDHDHSHAHAHSHSBDHDHDHDHDHD
srlegaspi2101
 
Web-Engineering-Lec-14 (1) .pptx
iamayesha2526
 
Web-Engineering-Lec-14 (1 ).pptx
iamayesha2526
 
GRADE 12 UNIT 4 computer science Ethiopian.pptx
ElanPuthukkudi
 
xml2cdvcx vnbm,azsdfghjkml;sxdfcgmndxfcgvhb nmfctgvbhjnm ,cfgvb nm,xc vb.pdf
kavigamage62
 
BITM3730 10-31.pptx
MattMarino13
 
BITM3730 10-18.pptx
MattMarino13
 
What is xml
Aneesa Rahman
 
Xml material
prathap kumar
 
Xml material
prathap kumar
 
Xml material
xavier john
 
Web data management (chapter-1)
Dhaval Asodariya
 
Xml nisha dwivedi
NIIT
 
Introduction to XML
Abhra Basak
 
xml and xhtml.pptx
ssusere16bd9
 
Ad

More from Ayes Chinmay (7)

PPTX
Internet and Web Technology (CLASS-16) [Basic Elements of Java Program] | NIC...
Ayes Chinmay
 
PPTX
Internet and Web Technology (CLASS-15) [JAVA Basics] | NIC/NIELIT Web Technol...
Ayes Chinmay
 
PPTX
Internet and Web Technology (CLASS-14) [JSP] | NIC/NIELIT Web Technology
Ayes Chinmay
 
PPTX
Internet and Web Technology (CLASS-10) [Node.js] | NIC/NIELIT Web Technology
Ayes Chinmay
 
PPTX
Internet and Web Technology (CLASS-9) [React.js] | NIC/NIELIT Web Technology
Ayes Chinmay
 
PPTX
Internet and Web Technology (CLASS-6) [BOM]
Ayes Chinmay
 
PPTX
Internet and Web Technology (CLASS-1) [Introduction]
Ayes Chinmay
 
Internet and Web Technology (CLASS-16) [Basic Elements of Java Program] | NIC...
Ayes Chinmay
 
Internet and Web Technology (CLASS-15) [JAVA Basics] | NIC/NIELIT Web Technol...
Ayes Chinmay
 
Internet and Web Technology (CLASS-14) [JSP] | NIC/NIELIT Web Technology
Ayes Chinmay
 
Internet and Web Technology (CLASS-10) [Node.js] | NIC/NIELIT Web Technology
Ayes Chinmay
 
Internet and Web Technology (CLASS-9) [React.js] | NIC/NIELIT Web Technology
Ayes Chinmay
 
Internet and Web Technology (CLASS-6) [BOM]
Ayes Chinmay
 
Internet and Web Technology (CLASS-1) [Introduction]
Ayes Chinmay
 
Ad

Recently uploaded (20)

PDF
AI-Powered-Visual-Storytelling-for-Nonprofits.pdf
TechSoup
 
PPTX
Controller Request and Response in Odoo18
Celine George
 
PPTX
DAY 1_QUARTER1 ENGLISH 5 WEEK- PRESENTATION.pptx
BanyMacalintal
 
PDF
Biological Bilingual Glossary Hindi and English Medium
World of Wisdom
 
PPTX
How to Create Odoo JS Dialog_Popup in Odoo 18
Celine George
 
PPTX
How to Create a Customer From Website in Odoo 18.pptx
Celine George
 
PPTX
PPT-Q1-WK-3-ENGLISH Revised Matatag Grade 3.pptx
reijhongidayawan02
 
PPTX
How to Send Email From Odoo 18 Website - Odoo Slides
Celine George
 
PDF
Vani - The Voice of Excellence - Jul 2025 issue
Savipriya Raghavendra
 
PDF
Stokey: A Jewish Village by Rachel Kolsky
History of Stoke Newington
 
PDF
The Constitution Review Committee (CRC) has released an updated schedule for ...
nservice241
 
PPTX
care of patient with elimination needs.pptx
Rekhanjali Gupta
 
PDF
Aprendendo Arquitetura Framework Salesforce - Dia 03
Mauricio Alexandre Silva
 
PDF
STATEMENT-BY-THE-HON.-MINISTER-FOR-HEALTH-ON-THE-COVID-19-OUTBREAK-AT-UG_revi...
nservice241
 
PDF
Horarios de distribución de agua en julio
pegazohn1978
 
PPTX
Introduction to Biochemistry & Cellular Foundations.pptx
marvinnbustamante1
 
PDF
Women's Health: Essential Tips for Every Stage.pdf
Iftikhar Ahmed
 
PDF
Android Programming - Basics of Mobile App, App tools and Android Basics
Kavitha P.V
 
PPTX
grade 5 lesson matatag ENGLISH 5_Q1_PPT_WEEK4.pptx
SireQuinn
 
PPTX
infertility, types,causes, impact, and management
Ritu480198
 
AI-Powered-Visual-Storytelling-for-Nonprofits.pdf
TechSoup
 
Controller Request and Response in Odoo18
Celine George
 
DAY 1_QUARTER1 ENGLISH 5 WEEK- PRESENTATION.pptx
BanyMacalintal
 
Biological Bilingual Glossary Hindi and English Medium
World of Wisdom
 
How to Create Odoo JS Dialog_Popup in Odoo 18
Celine George
 
How to Create a Customer From Website in Odoo 18.pptx
Celine George
 
PPT-Q1-WK-3-ENGLISH Revised Matatag Grade 3.pptx
reijhongidayawan02
 
How to Send Email From Odoo 18 Website - Odoo Slides
Celine George
 
Vani - The Voice of Excellence - Jul 2025 issue
Savipriya Raghavendra
 
Stokey: A Jewish Village by Rachel Kolsky
History of Stoke Newington
 
The Constitution Review Committee (CRC) has released an updated schedule for ...
nservice241
 
care of patient with elimination needs.pptx
Rekhanjali Gupta
 
Aprendendo Arquitetura Framework Salesforce - Dia 03
Mauricio Alexandre Silva
 
STATEMENT-BY-THE-HON.-MINISTER-FOR-HEALTH-ON-THE-COVID-19-OUTBREAK-AT-UG_revi...
nservice241
 
Horarios de distribución de agua en julio
pegazohn1978
 
Introduction to Biochemistry & Cellular Foundations.pptx
marvinnbustamante1
 
Women's Health: Essential Tips for Every Stage.pdf
Iftikhar Ahmed
 
Android Programming - Basics of Mobile App, App tools and Android Basics
Kavitha P.V
 
grade 5 lesson matatag ENGLISH 5_Q1_PPT_WEEK4.pptx
SireQuinn
 
infertility, types,causes, impact, and management
Ritu480198
 

Internet and Web Technology (CLASS-7) [XML and AJAX] | NIC/NIELIT Web Technology

  • 2. IWT Syllabus: Module 3: XML Introduction to XML, XML vs HTML, Structures of a XML Document, Document Type Declaration (DTD), XML Validation, Well Formed XML Documents, Valid XML Document, XML DOM, XSL, XSL ransformation, XML Namespaces, XML Schema. AJAX AJAX Introduction, AJAX - The XMLHttpRequest Object, AJAX - Server Response, Ajax XML, Ajax Database jQuery jQuery DOM Selectors, HTML Content, jQuery CSS Styles, jQuery HTML DOM JSON Introduction, syntax, Data Types, Parsing, Stringify, Object, Arrays React.js Introduction, ES6, Render HTML, JSX, Components , props, state, Lifecycle, Events, forms, CSS
  • 3. HTML vs XML: No. HTML XML 1 HTML is used to display data and focuses on how data looks. XML is a software and hardware independent tool used to transport and store data. It focuses on what data is. 2 HTML is a markup language itself. XML provides a framework to define markup languages. 3 HTML is not case sensitive. XML is case sensitive. 4 HTML is a presentation language. XML is neither a presentation language nor a programming language. 5 HTML has its own predefined tags. You can define tags according to your need. 6 In HTML, it is not necessary to use a closing tag. XML makes it mandatory to use a closing tag. 7 HTML is static because it is used to display data. XML is dynamic because it is used to transport data. 8 HTML does not preserve whitespaces. XML preserve whitespaces.
  • 4. XML:  XML (eXtensible Markup Language) is a mark up language.  XML is designed to store and transport data.  Xml was released in late 90’s. it was created to provide an easy to use and store self describing data.  XML became a W3C Recommendation on February 10, 1998.  XML is not a replacement for HTML.  XML is designed to be self-descriptive.  XML is designed to carry data, not to display data.  XML tags are not predefined. You must define your own tags.  XML is platform independent and language independent.
  • 5. Advantage XML: 1. Defining your own elements 2. Better organized documents 3. Sorting of database
  • 6. XML DOM: <?xml version="1.0" encoding="UTF-8"?> <bookstore> <book category="cooking"> <title lang="en">Everyday Italian</title> <author>Giada De Laurentiis</author> <year>2005</year> <price>30.00</price> </book> <book category="children"> <title lang="en">Harry Potter</title> <author>J K. Rowling</author> <year>2005</year> <price>29.99</price> </book> <book category="web"> <title lang="en">Learning XML</title> <author>Erik T. Ray</author> <year>2003</year> <price>39.95</price> </book> </bookstore> <root> <child> <subchild>.....</subchild> </child> </root>
  • 7. XML - Parsers:  XML parser is a software library or a package that provides interface for client applications to work with XML documents.  It checks for proper format of the XML document and may also validate the XML documents.  Modern day browsers have built-in XML parsers.
  • 8. AJAX:  Full Form of AJAX is Asynchronous JavaScript And XML.  AJAX is not a programming language.  AJAX just uses a combination of: a) A browser built-in XMLHttpRequest object (to request data from a web server) b) JavaScript and HTML DOM (to display or use the data)
  • 9. How AJAX works ? 1. An event occurs in a web page (the page is loaded, a button is clicked) 2. An XMLHttpRequest object is created by JavaScript 3. The XMLHttpRequest object sends a request to a web server 4. The server processes the request 5. The server sends a response back to the web page 6. The response is read by JavaScript 7. Proper action (like page update) is performed by JavaScript
  • 10. XMLHttpRequest Object: <!DOCTYPE html> <html> <body> <h1>The XMLHttpRequest Object</h1> <p id="demo">Let AJAX change this text.</p> <button type="button" onclick="loadDoc()">Change Content</button> <script> function loadDoc() { var xhttp = new XMLHttpRequest(); xhttp.onreadystatechange = function() { if (this.readyState == 4 && this.status == 200) { document.getElementById("demo").innerHTML = this.responseText; } }; xhttp.open("GET", “test.txt", true); xhttp.send(); } </script> </body> </html>
  • 11. Send a Request To a Server: Method Description open(method, url, async) Specifies the type of request method: the type of request: GET or POST url: the server (file) location async: true (asynchronous) or false (synchronous) send() Sends the request to the server (used for GET) send(string) Sends the request to the server (used for POST)
  • 12. Server Response: Property Description onreadystatechange Defines a function to be called when the readyState property changes readyState Holds the status of the XMLHttpRequest. 0: request not initialized 1: server connection established 2: request received 3: processing request 4: request finished and response is ready status 200: "OK" 403: "Forbidden" 404: "Page not found" statusText Returns the status-text (e.g. "OK" or "Not Found")
  • 14. Model Questions: 1. XML uses (a) user-defined tags. (b) pre-defined tags. (c) extensible tags. (d) pairing tags. 2. The advantages of XML over HTML are: A. It allows processing of data stored in Web pages. B. It uses meaningful tags which aids in understanding the nature of a document. C. Is simpler than HTML. D. It separates presentation and structure of document. (a) A, B and C only (b) A, C and D only (c) A, B and D only (d) B and D only
  • 15. Model Questions: (Cont.) 3. What does XML stand for? (a) Exclusive modern links (b) Extensible markup language (c) Extra memory links (d) Exit markup language 4. To declare the version of XML, the correct syntax is. (a) <?xml version=’1.0’/> (b) <*xml version=’1.0’/> (c) <?xml version="1.0"/> (d) </xml version=’1.0’/>