Documenting .NET Framework Source Code with XML Comments
page 4 of 5
by Brett Burridge
Feedback
Average Rating: This article has not yet been rated.
Views (Total / Last 10 Days): 31369/ 55

What to do with the documented code

Once the XML comments have been added to the code, it is useful to be able to do something with them. Although code documented in a standard format is an obvious benefit, XML comments allow much more to be done with the source code.

Visual Studio allows the comments to be compiled to an XML file. Although this is a useful feature, the XML file should be considered an intermediate documentation format rather than finished project documentation. Simple documentation can be created by applying an XSL stylesheet to the XML file in order to produce a more easily readable HTML version of the documentation. Here is a simple example of how to implement a suitable XSL stylesheet: Simple XSLT stylesheet for Visual Studio .NET XML documentation.

If you want more comprehensive documentation or do not want to figure out the complex XSL syntax, there are a few other products of interest. The open source NDOC was a popular open source utility for generating documentation from XML commented source code. It extended the usage of XML comments through the introduction of a few additional tags, such as a tag for adding hyperlinks to the comments. Unfortunately, the main developer left the project and the source code has not been updated for several years. It also has no support for version 2.0 of the .NET Framework.

Alternatively, a product I have been working on since 2002, the .NET Documentation Tool creates documentation from .NET source code. It supports XML comments in either C# or VB.NET source code. Most types of .NET project are supported and it has been updated for version 2.0 of the .NET Framework. For ease of reference it also includes the application's source code within the documentation.


View Entire Article

User Comments

No comments posted yet.






Community Advice: ASP | SQL | XML | Regular Expressions | Windows


©Copyright 1998-2024 ASPAlliance.com  |  Page Processed at 2024-06-20 8:17:00 AM  AspAlliance Recent Articles RSS Feed
About ASPAlliance | Newsgroups | Advertise | Authors | Email Lists | Feedback | Link To Us | Privacy | Search