XML has a very basic structure. Consider the following snippet from an XML document:
<element attribute="value"> content </element>
This snippet demonstrates the building blocks of any XML document. Everything between a set of angly brackets ( <> ) is called a tag. The first tag in this sample is an opening tag. The second tag is a closing tag, which is recognizable by the slash ( / ) immediately following the bracket. Opening an closing tags form pairs, which are known as elements.
An element can have attributes with values. Between the opening and closing tag there can be more XML content. Either plain text or other XML elements. This nesting of elements allows a hierarchical structure to be created in the XML document.