This utility converts the IE NetworkData.xml files into standard HAR files.
- The XML has extra named objects inside arrays. E.g.
log.pages[].page.titleinstead oflog.pages[].title. These are removed. - The XML sometimes doesn't have the
page.startedDateTimematching the firstentry.startedDateTimefor that page. This results in some pages that have their first entry many seconds or minutes after the page's start time, which makes the HAR timeline unnecessarily elongated. - The XML is often missing all the
timingsfields (blocked,dns,ssl,connect,send,wait,receive). These are added.
- IE sometimes exports multiple
<page>elements with the samepage.id. You might want to take a look at the XML export and fix the ids if necessary.
var ie2har = require('./ie-networkdata-to-har');
var args = process.argv.slice(2);
var src = args[0];
var dest = args[1];
var indentation = parseInt(args[2]);
if (isNaN(indentation)) {
indentation = 2;
}
ie2har.xmlFileToHarFile(src, dest, { indentation: indentation }, function(err) {
if (err) console.error(err);
});