【问题标题】:XSLT or viewer app to view "Internet Explorer Network Inspector" xml exportsXSLT 或查看器应用程序以查看“Internet Explorer 网络检查器”xml 导出
【发布时间】:2012-09-20 15:26:10
【问题描述】:
使用 IE9 开发人员工具栏的网络选项卡,我捕获了一些围绕我的站点的导航,然后将这些日志导出到 XML 文件(默认为 NetworkData.xml)。
在该 XML 中,它的创建者标记设置为“Internet Explorer Network Inspector”。
是否有可以帮助显示该 XML 的 XSLT 或一些可以提供帮助的查看器应用程序?
更新:
根据未来的研究,NetworkData.xml 文件是 HAR 文件的 xml 表示。有不少在线 HAR 查看器。仍然找不到 XML-HAR 的查看器,也没有转换器。
【问题讨论】:
标签:
internet-explorer
internet-explorer-9
ie-developer-tools
【解决方案2】:
这是一个 XLST,不完整,但你会明白的。
编辑 NetworkData.xml 并添加
<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" href="NDTable.xsl" ?>
开头
在 NDTable.xsl 中保存以下 XML
<?xml version="1.0"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output method="html"/>
<xsl:template match="/">
<html>
<xsl:apply-templates/>
</html>
</xsl:template>
<xsl:template match="log">
<head>
<Title>
<xsl:value-of select="creator/name"/>
</Title>
</head>
<body>
<h1>
<xsl:value-of select="creator/name" />
</h1>
<P>Started at <xsl:value-of select="pages/page/startedDateTime" />
</P>
<table border="1">
<tr>
<th>Request</th>
<th>Response</th>
</tr>
<xsl:apply-templates select="entries" />
</table>
</body>
</xsl:template>
<xsl:template match="entry">
<tr>
<td>
<xsl:apply-templates select="request" />
</td>
<td valig="top">
<xsl:apply-templates select="response" />
</td>
</tr>
</xsl:template>
<xsl:template match="request">
<table>
<tr>
<td valign="top">
<xsl:value-of select="method" />
</td>
<td>
<xsl:value-of select="url" />
<table>
<tr>
<th>Headers</th>
</tr>
<tr>
<td> </td>
<td>
<xsl:apply-templates select="headers/header[not(name='Cookie')]" />
</td>
</tr>
</table>
<table>
<tr>
<th>Cookies</th>
</tr>
<xsl:apply-templates select="cookies" />
</table>
</td>
</tr>
</table>
</xsl:template>
<xsl:template match="response">
<table>
<td>
<xsl:value-of select="status" /> <span>.</span><xsl:value-of select="statusText" />
<br/>
<table>
<tr>
<th>Headers</th>
</tr>
<tr>
<td> </td>
<td>
<xsl:apply-templates select="headers/header" />
</td>
</tr>
</table>
<div style='background-color: #C0C0C0'> <xsl:value-of select="content/text" /> </div>
</td>
</table>
</xsl:template>
<xsl:template match="header">
<xsl:value-of select="name" /> : <xsl:value-of select="value" />
<br/>
</xsl:template>
<xsl:template match="cookie">
<tr>
<td> </td>
<td valign="top">
<xsl:value-of select="name" />
</td>
<td>
<xsl:value-of select="value" />
</td>
</tr>
</xsl:template>
</xsl:stylesheet>