Wednesday, 29 April 2020

What is XML?

What is XML?



XML stands for extensible markup language used for describing the data.
It (XML) is not a programming language i.e; we can not write programs using xml(Extensible markup language). XML (Extensible markup language) is a case sensitive markup language ( i.e; XML tags are case sensitive). These files will have an extension of .xml (for example first.xml).

It (xml - Extensible markup language ) is very often used to separate data from presentation.


Properties of XML:

  1.  XML is a markup language which mainly focuses on data.
  2.  The main purpose of this file is to  store  data.
  3.  Both xml and html are markup languages but both are different. XML is for storing data  where as html mainly focuses on how the data looks.
  4.  It is independent. of programming language and platform .
  5.  Software or hardware is not required for xml.
  6.  It doesn’t have  predefined tags, in xml we have to create your own tags.
  7.  XML supports unicode. Unicode is an international encoding standard.
  8.  we can open and modify the data of xml file easily.
  9.  XML allows validation using DTD and Schema which ensures that this  document has no syntax error.


What are XML attributes?

An XML element can have attributes which adds additional data to the XML element.
These  attributes are name and value pairs.

For example: Here we have added an attribute name company and value ABC to the element <Bike>

<Bike company="ABC">
  <color>red</name>
  <speed>75<speed>
</Bike>

An element can have more than one attributes, but one attribute can have only one value.




Rules for XML attributes:

            The name of attribute should not be in quotes and attribute value must be in quotes (single or double)


What is XML prolog?

  The top line in xml file
    i.e.; <?xml version="1.0" encoding="UTF-8"?> is called XML prolog.


Some Questions are:
Is xml a programming language?
Is xml a platform independent language?

The answer to above two questions is NO

No comments:

Post a Comment