[.net] XmlReader woes

Started by
1 comment, last by EvilNando 15 years, 10 months ago
Hi all I'm making a program that generates an XML file (in memory) and then outputs what has been generated through a richtextbox control Ive managed to accomplish this task by doing this: byte[] byte_array = new byte[memory_stream.Length]; memory_stream.Read(byte_array, 0, (int)memory_stream.Length); parent_form.rch_txtbox.Text = Encoding.UTF8.GetString(byte_array); where memory_stream is the assigned stream for the XmlWriter object. while this does the job, I would like to know if it is possible to get the XML line by line , that way I could format with colors the tag names and their values (Pretty much like visual studio does when opening xml files) any ideas? Thank you
Advertisement
Once you have your XML string, you can split it into lines easily enough by doing something like this:

string[] lines = xmlText.Split(Environment.NewLine);
Mike Popoloski | Journal | SlimDX
awesome!!

This topic is closed to new replies.

Advertisement