Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

show formatted xml in textbox

Tags:

c#

.net

xml

I've been searching for a way to show formatted xml in a textbox, everything I've found so far points towards reading in xml from a file and formatting that, however I want to show xml which is held in a database field.

The idea is that a user will have records returned to a gridview, the gridview will show everything apart from the xml message due to its size. They can then select the record and show the xml on a pop-up form.

I have the xml passed to the pop-up form, just not sure how to handle it. Any ideas welcome.

like image 612
DarkW1nter Avatar asked Jun 03 '13 10:06

DarkW1nter


1 Answers

Got round it by using

xmlOut = System.Xml.Linq.XDocument.Parse(txtXml).ToString();
like image 74
DarkW1nter Avatar answered Oct 07 '22 21:10

DarkW1nter