Extracts the XML template data from the file.

def _load(self):
        """Extracts the XML template data from the file."""
        if os.path.exists(self.path):
            root = ET.parse(self.path).getroot()
            if (root.tag == "fortpy" and "mode" in root.attrib and
                root.attrib["mode"] == "template" and "direction" in root.attrib and
                root.attrib["direction"] == self.direction):
                #First, we need instances of the template contents for each of the
                #versions listed in the fortpy tag.
                for v in _get_xml_version(root):
                    self.versions[v] = TemplateContents()
                #Now we can update the contents objects using the XML data.
                self._load_entries(root)

                #See if a custom name was specified for the auto-converted
                #files.
                if "autoname" in root.attrib:
                    self.name = root.attrib["autoname"]
            else:
                msg.err("the specified template {} ".format(self.path) + 
                        "is missing the mode and direction attributes.")
                exit(1)
        else:
            msg.err("could not find the template {}.".format(self.path))
            exit(1)