Question

In Google Chrome, when you open an xml file, you get a formatted (pretty) view of the xml if there is no stylesheet referenced in the xml file itself.

I simply want to do this in my application, which uses Awesomium.

I am using the Awesomium.Windows.Forms.WebControl

I don't want to roll my own if I can avoid it.

Thanks!

Was it helpful?

Solution

I'm doing this in an internal tool for my development team. I format the XML with an xsl that colors and indents everything, then update the web control with the resulting HTML.

Check out this link for formatting XML, the CSS styles are built in, so you can update styles colors as you wish See the "XML to HTML Verbatim Formatter with Syntax Highlighting" project on this page. http://www2.informatik.hu-berlin.de/~obecker/XSLT/

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top