Elements

I received the latest installment of my online XML course. This week we are covering XML elements. As an aside, I am joining a professional computer association. They state that they have training available for all paid members. One of the courses they teach is XML. So I may have another opportunity to brush up on my XML skills in the future.

The lesson first reviewed the composition of an XML document. It starts with an XML declaration. The rest of the file consists of XML elements. The outermost element is the container element. In a tree notation, each branch of the tree is an element.

The prologue identified that the file is in XML format. The prologue can include validation such as a DTD or XML Schema. It also contains processing instructions.

It is interesting to note that an XML document can contain only one element. In this case, that element would be the containing element. However it would contain no other nested XML elements. This brings up the fact that elements can contain other elements. All elements except the outermost element are contained within the outermost element. However these elements themselves can contain other XML elements.

The concepts of an element and its tags are distinct. Elements can be empty. For such an element, there is short hand syntax to eliminate the full trailing tag. I think it is safe to say that elements are one of the key parts of an XML document.