I expect from the parser to parse wiki markup before parsing html tags […]
As I said. As neither the wiki markup nor the XML tags in the given example are valid, one can't expect anything. Seriously. Code like <ref>{{cite|</ref>}} is just broken. It's like having two nested Klein bottles. Both structural elements are inside and outside the same time.
What do you even want to achieve?
Best Thiemo