Wednesday, January 8, 2020

WHAT IS XML ?

With the dawn of internet and web-based applications, data exchanging and become an internal part of communication. Unlike an informal communication between two friends, a business communication requires a proper structure and description of data being exchanged. The advatages of XML in terms of self-created tags and the independence to define formating rules gave incessant popularity to it. Its impeccable utility and revolutionary properties have inspired the educationists to include it in the school curriculum. In this chapter, we will learn everything about XML which lies within the scope of the syllabus.
XML is also a markup language just like HTML. Though they differ in their functionality and basic purpose, yet the basic skeleton for both are tags. HTML has pre-defined tags, whereas we can define our own tags in XML. Before we proceed, it is important to understand the basic difference between these two languages. HTML focuses purely on the overall appearance of data. From displaying data on a website to the placement of tabs, font size of text to color of the background, everything is handled by HTML.
XML stands for Extensible Markup Language. Since we can define our own tags, the term 'Extensible' comes into picture. The first thing you need to know is that everything in XML is self-describing. Such languages are called meta-markup languages. XML uses a Document Type Definition (DTD) to describe its data to users and applications that use it.
If we can define our own tags, we surely need some kind of validation for them. Validation is a process of checking a document against a DTD. It is important to know at this stage that a DTD contains all possible element found in ourdocument. It also defines the valid attributes for all such elements and the types of those attributes.
To make the basic understanding simpler, one must always remember that XML was designed only to structure,store and transport data. It never does anything to data. For example, send a   simple mail to your old pal conveying a hello. Let us see how the structure of this mail looks like in XML.
Now, look at the above message carefully. Did XML do anything with the data ? The answer is a clear NO. This piece of data is quite self-explanatory but it is of no use until we write a piece of code to send or display it. Hence, XML is simply text.Since it completely wraps and hides data, it has gradually become a W3C recommendation. Thus, we can see that HTML and XML work hand in hand for most Web-Applications. While XML transports the data, HTML displays it.
Let us learn the different concepts of XML in a step by step manner and understand the basic differences between HTML and XML at each level.
By now we have understood the HTML is used to display and format the data. Suppose you choose to change the data every time you use it. Editing a complete HTML page is a difficult job as minor changes in formatting000 can change the overall appearance of the page. This is Where XML comes into picture. You can store data in different XML files and let HTML focus on the display and formatting part.Hence,it will be not required to change your HTML code again. Now,XML data can also be stored inside HTML pages as Data Islands. 
while the <xml></xml> tags show the presence of any such XML data within the HTML document; the 'SRC' attribute is used to map an external XML file.

No comments:

Post a Comment