You just write the HTML and then it replaces $variables with data, e.g.:
<html><head> <title>{$title}</title> </head><body> <h1>{$title}</h1> <div class="main">{$content}</div> ...
I searched around and found this article: https://www.gnu.org/software/qexo/XQ-Gen-XML.html
And here is the source of my website using it: https://github.com/benibela/site
You just write the HTML and then it replaces $variables with data, e.g.:
It has for loops and functions, too