The answer is "yes and no." It isn't the same, but SQLite is actually pretty capable in this regard. You do have to roll your own solution however.
To understand how to do this you have to understand how SQLite differs from a database like PostgreSQL or Oracle. While the latter two are servers which communicate with clients over sockets (network or UNIX), SQLite is a library which communicates with the rest of the application using in-process memory. SQLite has no specific XML tools but it has infrastructure for you to create your own. Given that you didn't specify the language you are working with (and this makes the embedded db approach different) I will discuss how to think about it, and then provide pointers to the Python and C API documentation.
In PostgreSQL you extend SQL by providing functions which get run when they are called. These live in the backend and are instantiated when called. In SQLite, your process is the same as the backend so anything you have in your library is in the same process as SQLite. This means you can extend SQL as a language in arbitrary ways just by telling SQLite what function to call when it sees a function it doesn't understand. Thus you would build this up by defining function calls and then registering them with SQLite.
The Python documentation provides a complete working example with how to register a Python function with SQLite such that it generates an md5hash when called. The same approach can be used to generate whole XML documents. I am noting it first because this gives a good example of what you can do.
The SQLite documentation covers this in detail from a C perspective. From here you can define your own aggregates, your own functions, and much more. So you have all the building blocks you need for something like this, just the last mile is not provided.