37

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?

1
  • 1
    (If someone with the reputation can tag this as ie9-developer-tools (there's already an ie8-developer-tools) I'd be grateful. I think this same functionality is built into IE8 as well, so perhaps that tag could be added as well.) Dec 1, 2011 at 23:40

4 Answers 4

41

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

2
  • Well look at that. Good find. Although I suppose at that point might as well just run Fiddler. Thanks! Apr 4, 2013 at 15:46
  • 1
    This is very nice. We can have our QA staff document perceived performance issues using only IE and have them attach the logs to our issue tracking for our analysis.
    – Thierry
    Jun 13, 2016 at 19:42
5

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.

0
3

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!
0
0

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>

Your Answer

Reminder: Answers generated by Artificial Intelligence tools are not allowed on Stack Overflow. Learn more

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.