A More Complex Generator
One can derive more than one generator:
When no elements are open, it will generate all XML tokens.
When one or more elements are opened, it will generate the remaining "children" of the current element, suppressing the end tag token.