[en] Is there any C/C++ like if/else/else if and switch-case alternative in LT

I’m looking for an alternative to an if-else and a switch-case ladder like the C language in LT. Although it’s not C, it’s just XML. Also need a counter like a while and a for loop, how can I do that here in an XML file.
I know there are options, but the options are not explicitly clear and at least not controllable like a C code.

P.S. I know there is an <antipattern>...</antipattern> but I’m not talking about that.

There are no loops or ifs in our XML. You’ll need to implement your rule in Java, see “Adding new Java rules” at Development Overview - LanguageTool Wiki.