Solved

How can I show formatted and colored XML in a C# application?

Posted on 2009-03-31
5
427 Views
Last Modified: 2013-11-26
I currently have a textbox in my app that is used to display XML.  As you can imagine, the displayed XML doesn't look very nice.  I want to add color to my display (similar to what you'd get if you displayed XML in any XML viewer or from within Visual Studio).  Additional formatting would be nice, but isn't required.  What is the simplest control or method for doing this?
0
Comment
Question by:NewDawn
  • 2
  • 2
5 Comments
 
LVL 33

Expert Comment

by:Todd Gerbert
ID: 24032825
You might be able to embed an Internet Explorer WebBrowser in your form, though I'd guess that was read-only...
0
 
LVL 29

Expert Comment

by:anarki_jimbel
ID: 24032895
If you just want to display - the easies method I believe is to use a web browser. You may apply a transformation style and you'll get nicely formatted colored xml. I can give you the solution.

However if you need to edit your xml the task is probably a bit more tricky. Not sure at the moment.
0
 

Author Comment

by:NewDawn
ID: 24033078
I need the XML to be editable.
0
 
LVL 33

Accepted Solution

by:
Todd Gerbert earned 500 total points
ID: 24033246
I would Google around for a .Net XML WinForm control.  Looks like there might be one included in SharpDevelop, which is free.
0
 
LVL 29

Expert Comment

by:anarki_jimbel
ID: 24034158
0

Featured Post

What Is Threat Intelligence?

Threat intelligence is often discussed, but rarely understood. Starting with a precise definition, along with clear business goals, is essential.

Join & Write a Comment

For those of you who don't follow the news, or just happen to live under rocks, Microsoft Research released a beta SDK (http://www.microsoft.com/en-us/download/details.aspx?id=27876) for the Xbox 360 Kinect. If you don't know what a Kinect is (http:…
Introduction In my previous article (http://www.experts-exchange.com/Microsoft/Development/MS-SQL-Server/SSIS/A_9150-Loading-XML-Using-SSIS.html) I showed you how the XML Source component can be used to load XML files into a SQL Server database, us…
Internet Business Fax to Email Made Easy - With eFax Corporate (http://www.enterprise.efax.com), you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, fr…
You have products, that come in variants and want to set different prices for them? Watch this micro tutorial that describes how to configure prices for Magento super attributes. Assigning simple products to configurable: We assigned simple products…

706 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now