Solved

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

Posted on 2009-03-31
5
434 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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 30

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 30

Expert Comment

by:anarki_jimbel
ID: 24034158
0

Featured Post

Enroll in May's Course of the Month

May’s Course of the Month is now available! Experts Exchange’s Premium Members and Team Accounts have access to a complimentary course each month as part of their membership—an extra way to increase training and boost professional development.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article is for Object-Oriented Programming (OOP) beginners. An Interface contains declarations of events, indexers, methods and/or properties. Any class which implements the Interface should provide the concrete implementation for each Inter…
It was really hard time for me to get the understanding of Delegates in C#. I went through many websites and articles but I found them very clumsy. After going through those sites, I noted down the points in a easy way so here I am sharing that unde…
Finding and deleting duplicate (picture) files can be a time consuming task. My wife and I, our three kids and their families all share one dilemma: Managing our pictures. Between desktops, laptops, phones, tablets, and cameras; over the last decade…

751 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