XML Language / XML Introduction

It is a markup language used to store and transport data. It is used for describing the data but not for presenting or displaying data. It consists user defines tags but not predefined tags. It represents the data in a tree format.

1. Write a program in xml and consider 3 languages (c, cpp and java) with their author names and c having a attribute version with value is 1.0.

xml sample program

Output
xml sample program

Explanation
Open notepad and write XML file contains XML tags in the saved file with .xml extension.It (XML tag) consists of root, container, sub containers and Element. Xml file contains only one root, root contains sub containers and sub containers contain elements. Sub containers can contain attributes.

Tag called as Tag used
Root <languages></languages>
Containers <c></c> and <cpp><cpp>
Sub containers < textbookAuthornames></ textbookAuthornames>
Elements <Authorname> </Authorname>
Empty tag <java/>
Attribute version='1.0'


Home     Back