I don't see how to prevent your XML file's encoding value being validated in NetBeans when saving the file.
You could easily provide your own DTD or XSD file for validation within the template file, but even then I don't think it is possible to specify in that file that the invalid encoding value in the XML declaration (the first line in your file) should be ignored.
It's worth noting that NetBeans refuses to save any file with an XML declaration with an invalid encoding on it first line, regardless of the file's extension. For example, it won't even save this file with an arbitrary extension named newXMLDocument1.xml2:

Of course the file can be saved if the XML declaration with the invalid encoding is not the first line in the file. For example:
<!-- Any comment -->
<?xml version="1.0" encoding="zzzz" ?>
<arg>
</arg>
But that doesn't really solve anything. It's just changing one form of invalid XML for another.