SPDisposeCheck xsl for viewing xml output

XML Structure we get after running SPDisposeCheck command line:

 

 

After applying XSL:

 

How to get this:

1. Save below code with name “SPDisposeChecker.xsl”

<?xml version=”1.0″?>

<xsl:stylesheet version=”1.0″
xmlns:xsl=”http://www.w3.org/1999/XSL/Transform”&gt;

<xsl:template match=”/”>
<html>
<body>
<h2><a href=”http://gadekarsatish.blogspot.com”>SPDisposeCheck</a></h2&gt;
<table border=”1″>
<tr bgcolor=”#9acd32″>
<th>ID</th>
<th>Module</th>
<th>Method</th>
<th>Assignment</th>
<th>Line</th>
<th>Notes</th>

</tr>
<xsl:for-each select=”ArrayOfProblem/Problem”>
<tr>
<td><xsl:value-of select=”ID”/></td>
<td><xsl:value-of select=”Module”/></td>
<td><xsl:value-of select=”Method”/></td>
<td><xsl:value-of select=”Assignment”/></td>
<td><xsl:value-of select=”Line”/></td>
<td><xsl:value-of select=”Notes”/></td>
</tr>
</xsl:for-each>
</table>
</body>
</html>
</xsl:template>

</xsl:stylesheet>

2. Add below line in xml obtained from command line

<?xml-stylesheet type=”text/xsl” href=”SPDisposeChecker.xsl”?>

3. Save the xml and double click on it.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s