Creating ruleset reports
It is a relatively simple operation to use System.Xml.Xsl
and System.Xml.XPath
to iterate through the elements in the XDocument
created by the getXDocument()
method. The result is an HTML page that can be displayed in any browser:
Note
This is a very utilitarian display. I will let you format the report to your own requirements!
The ReportDocument()
method prompts for the name of an HTML document to output to.
public void ReportDocument(
bool includeRulesets, bool includeIssues)
{
try
{
string title = "";
if (includeRulesets)
title += "RuleSets";
if (includeRulesets && includeIssues)
title += " and ";
if (includeIssues)
title += "Issues";
string shortName =
System.IO.Path.GetFileNameWithoutExtension(
this.document.FullName);
string fileName = System.IO.Path.Combine(
this.document.Path...