HTML tutorial
CSS3 tutorial
Bootstrap tutorial
JavaScript tutorial
JQuery tutorial
AngularJS tutorial
React tutorial
NodeJS tutorial
PHP tutorial
Python tutorial
Python3 tutorial
Django tutorial
Linux tutorial
Docker tutorial
Ruby tutorial
Java tutorial
C tutorial
C ++ tutorial
Perl tutorial
JSP tutorial
Lua tutorial
Scala tutorial
Go tutorial
ASP.NET tutorial
C # tutorial
XML is used in many aspects of web development.XML is often used to separate data from presentation
XML does not carry any information about how to be displayed.
The same XML data can be used in many different presentation scenarios.
Because of this, with XML, there is a full separation between data and presentation.
In many HTML applications, XML is used to store or transport data, while HTML is used to format and display the same data.
When displaying data in HTML, you should not have to edit the HTML file when the data changes.
With XML, the data can be stored in separate XML files.
With a few lines of JavaScript code, you can read an XML file and update the data content of any HTML page.
Display Books.xml »
<?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">XQuery
Kick Start</title>
<author>James McGovern</author>
<author>Per Bothner</author>
<author>Kurt Cagle</author>
<author>James Linn</author>
<author>Vaidyanathan
Nagarajan</author>
<year>2003</year>
<price>49.99</price>
</book>
<book category="web"
cover="paperback">
<title lang="en">Learning XML</title>
<author>Erik T. Ray</author>
<year>2003</year>
<price>39.95</price>
</book>
</bookstore>
You will learn a lot more about using XML and JavaScript in the DOM section of this tutorial.
Thousands of XML formats exist, in many different industries, to describe day-to-day data transactions:
Using a standard makes it easier for both news producers and news consumers to produce, receive, and archive any kind of news information across different hardware, software, and programming languages.
An example XMLNews document:
<?xml version="1.0" encoding="UTF-8"?>
<nitf>
<head>
<title>Colombia Earthquake</title>
</head>
<body>
<headline>
<hl1>143 Dead in Colombia Earthquake</hl1>
</headline>
<byline>
<bytag>By Jared Kotler, Associated Press Writer</bytag>
</byline>
<dateline>
<location>Bogota, Colombia</location>
<date>Monday January 25 1999 7:28 ET</date>
</dateline>
</body>
</nitf>
An XML national weather service from NOAA (National Oceanic and Atmospheric Administration):