XML, like JSON, is a hierarchical data format that allows a nested data structure. If you have worked with HTML before, you might be familiar with the general structure and syntax of XML, which HTML is based on.
An XML dataset consists of a nested tree of elements where each element may contain text with a particular value, another element or a collection of additional elements. Each element in the tree may also contain any number of attributes which describe the element.
Each element is represented by an opening tag and a closing tag. An opening tag indicates the beginning of an XML element. It is written by writing the name of the tag inside angle brackets. The following is what an XML opening tag looks like:
<tagname>
A closing tag follows the opening tag and indicates the end of an element. It is written by specifying the name of a tag inside angle brackets with a /
before the name. The following is what an XML closing tag looks like:
</tagname>