We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

Having trouble getting XML to display properly

I'm loading an XML exe.config file from a database connection and reading it into an XML Document.

Either as XML or the ToString() version (they are all sans CR/LFs) display much of the file in esstial edit without proper formatting as when you open the file in IE where the tags and indenting make the file human readable.

Being very new to these tools I hope there is a way to tell the tool to format the XML for human viewing/editing? Is there?

Pete

1 Reply

GR Golda Rebecal Syncfusion Team August 17, 2007 11:21 AM UTC

Hi Pete,

If the file that is loaded in the EditControl is already indented, the EditControl will display the file as such.

Please refer to attached sample that illustrates the same.
http://websamples.syncfusion.com/samples/Edit/F67354/main.htm

If the file that is loaded is not already indented and if you want the EditControl to perform the formatting, you have to write a separate class that implements IAutoFormatter interface and use it in EditControl.

Please refer to the following link for more details:
http://www2.syncfusion.com/ug/Default.aspx##Essential%20Studio.chm/EditWindows/AutoFormatting.html

Kindly let me know if you need any further assistance.

Best regards,
Golda

Loader.
Live Chat Icon For mobile
Up arrow icon