• @shahgols: The Deadlock Graph visualizer in SSMS expects XDL (XML Deadlock List) files as output from SQL Profiler using the following technique: How to save deadlock graph events as .xdl file in SQL Server?[/url]

    At least in the case of SQL Server 2008, the XML output from Extended Events using Jonathan's code is very similar, but not quite the same. Thankfully there are not too many modifications that need to be done:

    1. The root node needs to be <deadlock-list>, one level above <deadlock>

    2. The id attribute of the <victimProcess> tag needs to be copied into the victim attribute of the <deadlock> tag.

    3. I don't know if this is necessary, but I've also been deleting the <victim-list>...</victim-list> tag block.

    So you should transform your output from something like this:

    <deadlock>

    <victim-list>

    <victimProcess id="process62a988" />

    </victim-list>

    <process-list>

    ...

    </process-list>

    <resource-list>

    ...

    </resource-list>

    </deadlock>

    To something like this:

    <deadlock-list>

    <deadlock victim="process62a988">

    <process-list>

    ...

    </process-list>

    <resource-list>

    ...

    </resource-list>

    </deadlock>

    </deadlock-list>

    Hope this helps!