Default XML stylesheet in Chrome?

2020-03-03 05:31发布

In Internet Explorer, the default stylesheet used to display XML documents can be found at:

res://msxml.dll/DEFAULTSS.xsl

In Firefox, the equivalent can be found at

chrome://global/content/xml/XMLPrettyPrint.xsl

Is there something equivalent in Chrome?

2条回答
Juvenile、少年°
2楼-- · 2020-03-03 05:57

The CSS for the XML viewer specifically is https://code.google.com/codesearch#OAMlx_jo-ck/src/third_party/WebKit/Source/WebCore/xml/XMLViewer.css. That file, in combination with https://code.google.com/codesearch#OAMlx_jo-ck/src/third_party/WebKit/Source/WebCore/css/view-source.css, should give you all the detail you need.

Also remember that you're able to use the Web Inspector on XML files to see the rendered HTML, which should help you piece together exactly how the view works.

查看更多
霸刀☆藐视天下
3楼-- · 2020-03-03 06:18

Do have a look at:

https://code.google.com/codesearch#OAMlx_jo-ck/src/third_party/WebKit/Source/WebCore/xml/XMLViewer.js

Also, if you want to see yet another XSLT transformation that produces precise and good-loking in the browser XML representation, do have a look at the transformation used by the XPath Visualizer -- both for IE and for FF.

查看更多
登录 后发表回答