The references given in Solution 1 by
Zoltán Zörgő are good.
As an alternative the component given in this CodeProject article,
Fast Colored TextBox for Syntax Highlighting[
^] can be tried.
In the example given at the above article the Syntax highlighting for
C#, VB, HTML, SQL, PHP
were shown. Further, there is an option in the code to set the syntax highlighting for other requirements. So, the required syntax settings for the
XML
can be given in the above component on the similar lines of
HTML
syntax highlighting already given in the example.
It is mentioned in the article that
".... component inherited from RichTextBox, but while using it for a large amount of text I found out that RichTextBox highlights very slowly a large number of colored fragments (from 200 and more). .... Therefore I created my own text component which uses neither Windows TextBox nor RichTextBox........... possesses tools to make comfortably dynamic syntax highlighting."