Question

I'm using the F12 developer tools built into Internet Explorer 9 to capture network traffic on a site. This information can be saved to an XML (default) or CSV file.

The XML file seems to contain much more information, but I'm having a hard time finding any applications that will read these.

Using Internet Explorer Developer Tools Network Capture states:

The Save button writes the current HTTP session to an XML file by using the HTTP Archive schema or a .CSV file. After saving the session, you can open the session by using any tool that can read HTTP archive files, or .CSV files. Internet Explorer 9 can export your data, but it can view only live HTTP sessions and cannot read saved files.

However, I'm having a hard time finding relevant results in a search for the HTTP Archive schema, and while CSV is nice, it seems to be missing some very nice information. (I may not need that extra information now, but it might be useful in the future.)

Are there tools or resources (XSLT or LINQPad/.NET snippet) that allow for the easy parsing of this information after the fact?

Was it helpful?

Solution

Fiddler does support importing HTTP Archive XML (exported from IE9 Developer Tools Network Tab) as per its blog

OTHER TIPS

For those analysing customer logs, who don't have a Windows box to run Fiddler on...

It turns out that the XML that IE produces is just HAR in XML instead of JSON format. I wrote a converter to turn it into a normal HAR file: https://gist.github.com/craigds/00331c6ff8fd2334de68a52ef0cd79c2

Requires python and LXML.

Fiddler can read these now, (but not via import):

  1. File > Import Sessions
  2. Select IE's F12 NetXML Format.
  3. Select correct file
  4. PROFIT!

Here is a Sample XLST to diplay NetworkData.xml in a browser, is not complete but you'll get the idea.

Edit NetworkData.xml and add

<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" href="NDTable.xsl" ?>

at the beginning

Save the following XML at NDTable.xsl

<?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>
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top