XML tags are as simple as in HTML but in XML tags are more flexible. There are no predefined XML tags, You must define your personalized tags (user defined tags).
The simple XML document must contain opening tag and closing tag. The XML tags are case sensitive i.e.
The beginning of every XML element is marked by a start-tag.
Syntax <studyglance>
Every element that has a start tag should end with an end-tag. The end tags include a forward slash ("/") before the name of an element.
Syntax </studyglance>
The text that appears between start-tag and end-tag is called content. An element which has no content is termed as empty. A start-tag immediately followed by an end-tag or a complete empty-element tag is as shown below
<!-- empty-element -->
<studyglance> </studyglance>
<!-- A complete empty-element -->
<studyglance />
The first part of a document is the prolog. It is optional so you won’t see it every time, but if it does exist it must come fi rst. The prolog begins with an XML declaration which, in its simplest form, looks like the following:
Syntax <?xml version="1.0" encoding="UTF-8"?>
This declaration contains the version number, and currently this will always be either 1.0 or 1.1 and also contain information about the encoding used in the document. Here the encoding is specifi ed as UTF-8.
Comments are a piece of text placed within a program to help other users to understand it, which the computer ignores when running the program. XML Comments are used as notes or lines for understanding the purpose of an XML code
Syntax <!-- This is a comment -->