You are on page 1of 3

What is XML?

XML is a markup language which is designed to store data. It is popularly used for
the transfer of data. It is case sensitive. XML offers you to define markup elements
and generate customized markup language. The basic unit in the XML is known as
an element. Extension of XML file is .xml

Features of XML
• XML tags are not predefined. You need to define your customized tags.

HTML XML

Is a standard markup language that defines other markup


Is a markup language.
languages.

Is not case sensitive. Is case sensitive.

Doubles up as a presentation language. Is not a presentation language nor a programming language.

Tags are defined as per the need of the programmer. XML is


Has its own predefined tags.
flexible as tags can be defined when needed.

Closing tags are not necessarily needed. Closing tags are used mandatorily.

White spaces are not preserved. Capable of preserving white spaces.

Showcases the design of a web page in the Enables transportation of data from database and related
way it is displayed on client-side. applications.

Used for displaying data. Used for transferring data.

Static in nature. Dynamic in nature.

With the help of elements and attributes, objects are expressed


Offers native support.
by conventions.
Null value is natively recognised. Xsi:nil on elements is needed in an XML instance document.

Extra application code is not needed to parse XML DOM application and implementation code is needed to
text. map text back into JavaScript objects.

• XML was designed to carry data, not to display that data.


• Mark-up code of XML is easy to understand for a human.
• Well structured format is easy to read and write from programs.
• XML is an extensible markup language like HTML.

Example of XML
<?xml version="1.0>
<address>
<name> Krishna Rungta</name>
<contact>9898613050</contact>
<email>krishnaguru99@gmail.com </email>
<birthdate>1985-09-27</birthdate>
</address>

Q 1. What is the advantage of XML compared to HTML?


Ans. XML focuses on the transport of data without managing the appearance or presentation of
the output. This makes XML easy to use as HTML focuses on presentation and has complex
coding.

Q 2. What is the key difference between HTML and XML?


Ans. The key difference between HTML and XML is that HTML displays data and describes the
structure of a webpage, whereas XML stores and transfers data. XML is a standard language
which can define other computer languages, but HTML is a predefined language with its own
implications.

Q 3. XML vs HTML: What is the full form of the two terms?


Ans. XML stands for eXtensible Markup Language and the full form of HTML is Hypertext
Markup Language.

Q 4. What are the advantages of HTML over XML?


Ans. One of the biggest advantages of HTML over XML is that Appearance and Presentation
can be modified using HTML, which makes it more interactive. XML only focusses on the
exchange of information.
Q 5. Can XML and HTML work Together?
Ans. Yes, XML and HTML, both can work together. While XML can transport the data and
information, HTML can look after the display and presentation of their information.

You might also like