def create(filename, task, alias):
metadata = ET.Element('<STR_LIT>', {'<STR_LIT>': '<STR_LIT>'})<EOL>tool = ET.SubElement(metadata, '<STR_LIT>', name=task.name,<EOL>displayname=task.display_name,<EOL>toolboxalias=alias)<EOL>summary = ET.SubElement(tool, '<STR_LIT>')<EOL>summary.text = '<STR_LIT>'.join((HTML_BEGIN, task.description, HTML_END))<EOL>parameters = ET.SubElement(tool, '<STR_LIT>')<EOL>for task_param in task.parameters:<EOL><INDENT>param = ET.SubElement(parameters, '<STR_LIT>',<EOL>name=task_param['<STR_LIT:name>'],<EOL>displayname=task_param['<STR_LIT>']<EOL>)<EOL>dialog_ref = ET.SubElement(param, '<STR_LIT>')<EOL>dialog_ref.text = '<STR_LIT>'.join((HTML_BEGIN, task_param['<STR_LIT:description>'], HTML_END))<EOL>python_ref = ET.SubElement(param, '<STR_LIT>')<EOL>python_ref.text = '<STR_LIT>'.join((HTML_BEGIN, task_param['<STR_LIT:description>'], HTML_END))<EOL><DEDENT>dataIdInfo = ET.SubElement(metadata, '<STR_LIT>')<EOL>searchKeys = ET.SubElement(dataIdInfo, '<STR_LIT>')<EOL>keyword1 = ET.SubElement(searchKeys, '<STR_LIT>')<EOL>keyword1.text = '<STR_LIT>'<EOL>keyword2 = ET.SubElement(searchKeys, '<STR_LIT>')<EOL>keyword2.text = task.name<EOL>idCitation = ET.SubElement(dataIdInfo, '<STR_LIT>')<EOL>resTitle = ET.SubElement(idCitation, '<STR_LIT>')<EOL>resTitle.text = task.name<EOL>idAbs = ET.SubElement(dataIdInfo, '<STR_LIT>')<EOL>idAbs.text = '<STR_LIT>'.join((HTML_BEGIN, task.description, HTML_END))<EOL>idCredit = ET.SubElement(dataIdInfo, '<STR_LIT>')<EOL>idCredit.text = '<STR_LIT>'<EOL>resTitle.text = task.name<EOL>tree = ET.ElementTree(metadata)<EOL>tree.write(filename)<EOL>
Creates a gptool help xml file.