xml in template form supported

Also checking unicode instance as file object will be unicode.