in reply to Parsing string with tags

It is neither XML nor is it HTML.

Why not? Make it xml or html? Its literally what youre describing

xsh2, xsh2

And it would be cool if the string would be denied if the tagging is invalid

yeah dtd can specify such a denial :D or xsd