I have some XML that I need to show. It would be perfect if I could use WebBrowser to display xml just like IE does. It has syntax highlighting and nodes can collapse.
This works:
WebBrowser browser = (WebBrowser)this.GetTemplateChild("PART_Browser");
browser.NavigateToString("<html>hello</html>");
However this doesn't:
WebBrowser browser = (WebBrowser)this.GetTemplateChild("PART_Browser");
browser.NavigateToString("<?xml version="1.0" encoding="utf-16"?><ArrayOfResultSet xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/Search.Shared.Results"><ResultSet><Name>Bing</Name>...</xml>");
How can I get WebBrowser to display XML like Internet Explorer?