This error often comes up when the file being uploaded is not a valid template.
Open the file with a plain text editor and check that it looks something like this:
<?xml version="1.0" ?>
<template encoding-version="1.1">
<description></description>
<groupId>4d5dcf9a-015e-1000-097e-e505ed0f7fd2</groupId>
<name>nipyapi_testTemplate_00</name>