# \[BUG\]XML Parse Error Pasting Template XML

**URL:** <https://forum.inductiveautomation.com/t/bug-xml-parse-error-pasting-template-xml/84219>\
**Category:** Ignition\
**Tags:** ignition81\
**Created:** [January 12, 2024, 7:15pm UTC](https://forum.inductiveautomation.com/t/bug-xml-parse-error-pasting-template-xml/84219 "2024-01-12T19:15:18Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![amarks](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/amarks/32/45610_2.png) [@amarks](https://forum.inductiveautomation.com/u/amarks)\
**Post date:** [January 12, 2024, 7:15pm UTC](https://forum.inductiveautomation.com/t/bug-xml-parse-error-pasting-template-xml/84219/1 "2024-01-12T19:15:18Z")

</div>

I accidentally cut a template from the project browser. It's still in my clipboard, I can see the XML code. How can I get it back into my project?

There is a warning when deleting templates, but not when cutting. That should probably be updated.

---

<div class="post-metadata">

**Author:** ![amarks](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/amarks/32/45610_2.png) [@amarks](https://forum.inductiveautomation.com/u/amarks)\
**Post date:** [January 12, 2024, 7:23pm UTC](https://forum.inductiveautomation.com/t/bug-xml-parse-error-pasting-template-xml/84219/2 "2024-01-12T19:23:13Z")

</div>

I found the option to paste xml on a newly created template using shift + right click to "set XML" but I got a premature end of file. Guess I'll just have to start from the last backup that I have. Not too much lost...

I got a premature end of file parse exception on line 2, column 10. Not sure why... here's the top of the file

```auto
<?xml version="1.0" encoding="UTF-8"?>
<objects fpmi.archive.type="template" framework.version="8.1.27.2023042509" com.inductiveautomation.vision.version="11.1.27.0" timestamp="Fri Jan 12 12:50:15 CST 2024">
	<c id="144" cls="com.inductiveautomation.factorypmi.application.components.template.VisionTemplate">
		<c-comm>
			<p2df>1898.0;928.0</p2df>
			<r2dd>0.0;0.0;1898.0;928.0</r2dd>
			<str>THCK-Cent</str>
			<lc>0.0;0.0;16;1;-;-</lc>

```

column 10 would be the "f" after object....?

---

<div class="post-metadata">

**Author:** ![amarks](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/amarks/32/45610_2.png) [@amarks](https://forum.inductiveautomation.com/u/amarks)\
**Post date:** [January 12, 2024, 7:36pm UTC](https://forum.inductiveautomation.com/t/bug-xml-parse-error-pasting-template-xml/84219/3 "2024-01-12T19:36:58Z")

</div>

After further investigation, I found that even copying a known good template's XML into a new template generates an error.

This time I get a "Error reading head" error - unexpected end of ZLIB input stream

---

<div class="post-metadata">

**Author:** ![amarks](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/amarks/32/45610_2.png) [@amarks](https://forum.inductiveautomation.com/u/amarks)\
**Post date:** [January 19, 2024, 9:50pm UTC](https://forum.inductiveautomation.com/t/bug-xml-parse-error-pasting-template-xml/84219/4 "2024-01-19T21:50:13Z")

</div>

After talking to support, this is a result of how the project stores resources. In 8.1.25 an option to store resources as binary, XML, or "auto" was added.

 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/6/5/659cc25bbbe30010a3ca8712b3c1ee2977977c1c.png)

Setting this to XML instead of auto allows the copy/paste of XML templates to work.
