# File lib/aeolus_image/model/warehouse/image.rb, line 29
        def template_xml
          unless @template_xml
            begin
              # if an image is directly associated with template, use this
              if @template
                @template_xml = Template.find(@template).xml_body
              else
                @template_xml = Nokogiri::XML image_builds.first.target_images.first.target_template.body
              end
            rescue
              @template_xml = nil
            end
          end
          @template_xml
        end