Generating XML from an array

First, the main point of this task:
You need to generate arrays of the structure

Moreover, the input arrays may be different:

“complex tag

and an array of tags

Moreover, they can be nested within each other to generate complex XML structures.
Without tdd, it’s clear there.
As a result, we have a class for generating such arrays with tests to it.
All of the files in the application (the code of the class itself, tests)