Difficulty: Moderately Challenging
Step1
Check program notes, either coded or on paper, for clues as to what the programmer referred to as the root element.
Step2
The root element is the "overall" code object, so you can sometimes figure it out by naming conventions. For example, for an XML object set of Person, Head, Shoulders, Knees and Toes, you can logically assume the "Person" element to be the root as it encompasses all of the others.
Step3
Another way to recognize the root element is by opening and closing tags. If all of the XML data for Two, Three and Four occurs inside of the code for One, then One can be assumed to be the root element.
Step4
Yet another clue is that the root element would generally have more values and properties attached to it than the smaller elements within it. Look for clues like (type) = (value) that accompany the declaration of an element.
Step5
Follow coding conventions to deduce the root element. The W3 standards organization website declares that to be correct, any XML code must have a root element. It is sometimes identified as Root. Considering coding conventions can help you find the root element in a complex page.