开发者

Save a transformed xml to html

I've got an XML file with XSL, and CSS layers. When I view this in IE it looks exactly how I want it to look. When I try to save the file, I just get the XML document, what I need it a formatted 开发者_运维知识库HTML document.

I'm using VB.NET 2008, but I'd rather use an external tool than write more code. I've tried wget and have gotten the same results.


In IE, the transformation is happening on the browser, but the XML file itself isn't getting transformed. This is what you end up downloading.

You can use XslTransform in your code behind to make the transformation and serve it up as html.


You could try the command line transformation utility. It takes an input of the XSL, the XML and outputs the resulting HTML to a file.


For those who want to do it from IE 8 without using any other tool, you could open up Developer Tools (Tools > Developer Tools). It displays the transformed HTML and you can right click on the html node in the tree and click "Copy Outer HTML". Then you can paste it in another editor and save the HTML.


In IE, have you tried the Save As > Web Archive, single file or the WebPage Complete option? In theory, those methods are supposed to pick up all the "extras" too.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜