I recently tested your DomTemplate Class on a Template that used Fontawesome iconsets. Even when loading the template and immediately echo it out again, it came out as complete garbage.
I figured out that the Fontawesome icons like:
<i class="fa fa-heart"></i>
Where converted to this :
<i class="fa fa-heart" />
So they produced pretty weird results in the display Plus some other placeholder tags got converted too.
I solved this by adding the option LIBXML_NOEMPTYTAG to the saveXML method call in line 384.
I think this should be default behavior, as noone puts empty tags like <i class="fa fa-heart"></i> in a template whithout intention and many moderrn Bootstrap Templates for example use lots of those empty tags as Placeholders.