XML – Introduction

xml introduction

What Is XML?

XML (eXtensible Markup Language ) is a metalanguage (a language used to describe different languages) for outlining vocabularies (customized markup languages), which is the important thing to XML’s significance and recognition. XML-based vocabularies (resembling XHTML) allow you to describe paperwork in a significant method.

XMLvocabulary paperwork are like HTML (see http://en.wikipedia.org/wiki/HTML) paperwork in that they’re text-based and include markup (encoded descriptions of a doc’s logical construction) and content material(doc textual content not interpreted as markup). Markup is evidenced by way of tags (angle bracket-delimited syntactic constructs) and every tag has a reputation. Moreover, some tags have attributes (name-value pairs) .


XML and HTML are descendants of Customary Generalised Markup Language (SGML) , which is the unique metalanguage for creating vocabularies. XML is actually a restricted type of SGML, whereas HTML is an utility of SGML. The important thing distinction between XML and HTML is that XML invitations you to create your individual vocabularies with its personal tags and guidelines, whereas HTML offers you a single recreated vocabulary with its personal mounted set of tags and guidelines. XHTML and different XML-based vocabularies are XML purposes . XHTML was created to be a cleaner implementation of HTML.

In case you haven’t beforehand encountered XML, you is likely to be stunned by its simplicity and the way intently its vocabularies resemble HTML. You don’t want to be a rocket scientist to learn to create an XML doc . To show this to yourself:-

XML-Based Recipe for a Grilled Cheese Sandwich

        Grilled Cheese Sandwich
      <ingredient qty="2">
            bread slice
       cheese slice
     <ingredient qty="2">
             margarine pat

Place frying pan on component and choose medium warmth. For every bread slice, smear one pat of margarine on one aspect of bread slice. Place cheese slice between bread slices with margarine-smeared sides away from the cheese. Place sandwich in frying pan with one margarine-smeared aspect in contact with pan. Fry for a few minutes and flip. Fry different aspect for a minute and serve.


Presents an XML doc that describes a recipe for making a grilled cheese sandwich. This doc is paying homage to an HTML doc in that it consists of tags, attributes, and content material. Nonetheless, that’s the place the similarity ends. As a substitute of presenting HTML tags similar to <html>, <head>, <img>, and <p> this casual recipe language presents its personal <recipe><ingredients> and other tags.