+2 votes
I don't know the purpose of xml?

can any one explain what is xml?

where it is used in realtime? and give some examples
asked Jul 30, 2015 in Computer Science - IT by gypsiii
edited May 25, 2016 by slow_learner | 501 views

2 Answers

+1 vote
Selected Ans.

XML stands for EXtensible Markup Language.

But What is XML ?

xml is used to store and transport data.At the same time html is used to display data.

There are different formats in which datas can be transported,and it differs from system to system.Most of the time data is lost when we convert one format to another.Hence we can use xml format for data transfer.

XML stores data in plain text format. Hence it is software- and hardware-independent to store and transport data.

In detail:

A Web service is a method of communication between two electronic devices over a network.

Example using Webservice (webservice in .NET) :

  public class WebService1 : System.Web.Services.WebService

        public string HelloWorld()
            return "Hello World";

Consider you need to pass this data to an Android application and get "Hello World".

Solution would be you need to access this webservice.

But how ?

You can use that url to access that webservice.

These files with webservice will be hosted in any server.

Final output will be an XML file (we can also produce output in JSON format.)

In the above image you can see output in xml format

Let me explain you with another example :

Consider you need to create an android app in eclipse .

You run eclipse to create application.

The window will show you :

We have not added any controls still project will display you a window with HelloWorld..

If you check the code for that window it will show you :

Design View :

Code view :

<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
    tools:context=".MainActivity" >

        android:text="@string/hello_world" />



Above codings are written in xml.

To create layouts xml can be used !

We use datas in xml file formats in webservices . 

XML is nothing but a markup  language which are human readable format.

Hope that was clear....If you need more industrial applications you can find here

xml tutorial



answered Jul 30, 2015 by slow_learner
edited Nov 19, 2015 by slow_learner
+1 vote

Xml stands for Extensible Markup Language.It describes the class of data objects called xml documents and partially describes the behaviour of computer program which process them.XML is normally used for transporting data through feeds, API calls etc.If we have 10 different programs that need to be able to share data and each has its own proprietary format. To convert from any one proprietary format to any other directly would require 90 different filters to do the possible conversions. Converting to and from XML would only require 20. xml is used to store and transport data.

For example:


<?Xml version="1.0" encoding="ISO-8859-1" ?>


<first name>Shikha</first name>

<last name>Tyagi</last name>



Another example


<? Xml version="1.0" encoding="ISO-8859-1" ?>




answered Jan 12, 2016 by Shikha tyagi
edited Jan 13, 2016 by slow_learner