How to read and save and XML with Proper formatting (Parsing)
Suppose I want to read and write an XML file.
I want to create an application project ( in C# 2008) in such a way so that when i browse and open any XML file in my project, it will open in a proper formatting with indentation (similiar to what we have in other editors like XML Editor in VS, XML Spy etc).
It will have a collapse Expand feature which can support Syntax based colours. And further it will able to edit the XML and save it back.
The XML structure needs to be created at runtime when I'm reading the XML file using Regular expression.
Further the validation and parsing check of the XML structure can be properly done.
Similarly, I will able to directly edit and modify the XML structure at run time and save it back.
(I know that if I open an XML file in an IE browser, I will get the proper XML structure, but the only problem is that I wont to able to edit the XML on the IE browser and save it back)
I hope I am able to clarify my problem.
Please help if you have some codebase on the same. If you can help me with some source code it will be really appreciable.
Further whether will it be a good idea to load the XML file in a RichTextBox control and then do the parsing and formatting of XML.
|All times are GMT +5.5. The time now is 19:28.|