Where we Use XML?

  • XML is used for Transmitting data between server and web application. Ex. In a client and server Application where you want data from the server, or want to send data to the server, then you can use XML for this purpose.
  • XML is used to store data.
  • To create User Interface(UI) layouts in Android.

XML Used Separate Data from Presentation

XML doesn’t carry any information about how to display the data, due to this, we say that, there is a full separation between data and presentation of it.

Example

A quick look at the example of XML –

<?xml version="1.0" encoding="UTF-8" ?>
<product>
  <name>Beginner's Guide to SEO</name>
  <author>Tech Blicks</author>
  <price>$1</price>
</product>

In the above example, product information is stored in XML. To show the this above data in HTML page, we use small JavaScript codes.

Leave a Comment

Your email address will not be published. Required fields are marked *