There is an RichTextBox in my application, in which I want to show XML from externhal .xml file. But I need to show nodes/attributes/Values/Comments everything in xml format color. I have gone through XML Highlight in RichTextBox Link as well. But Its not helpful for me. As I have less time to complete this task. So can I get any API or some already built code for this?
I load XML as below
XmlDocument doc = new XmlDocument();
doc.Load("filepath.xml");
gameListXMLRichText.Document.Blocks.Clear();
gameListXMLRichText.AppendText(doc.InnerXml.ToString());
Formatting from the above link have lots of issues. but I can't go through that as of now, because of time. So please help me on this. Thanks in Advance.
Edit: As I have taken code from the link and applied the code on a simple xml. The result is looks like below
But It should look like
Only Proper color is required, for me. Proper formatting is not required.
Code link is : http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-components-postattachments/00-10-12-22-80/highlightRTF.txt