如何为zend php做一个基于xml的模板

I've seen how Magento generates their templates but I am not sure how to do it myself in my application.

Basically we want to be able to define something similar to:

<template>
  <section title="Recent Products">
    <snippet name="products" />
  </section>
</template>

Which in turn would be parsed.. somehow.. and render this code:

 <h1>Recent products</h1>
 <? include("Products"); ?>

(As an example...)

My main question is... is there anything written already that can do this? is there a term I can lookup online to get more information?

Thank you.