Render XML-to-HTML to be included in ASP.NET MVC masterpage

Again this is not my code, original post can be found here. So in the previous post, i managed to transform from xml to html in asp.net mvc, though with that method the resulting page opens up in a new window which is not quite what i expected. With this RenderXml extension method, result page will be embedded into the master page and it looks so much better.

To do that create a static class RenderXmlExtensions, copy this code below: