Is there an API in .net to read XML comment documentation file [closed] Is there an API in .net to read XML comment documentation file [closed] xml xml

Is there an API in .net to read XML comment documentation file [closed]


I maintain the Jolt.NET project on CodePlex and have implemented a feature that performs this very task. Please refer to the Jolt library for more information.

In essence, the library allows you to programatically locate and query an XML doc comments file for an assembly using the metadata types in System.Reflection (i.e. MethodInfo, PropertyInfo, etc...).


Microsoft's Sandcastle is a tool for extracting documentation from assemblies with or without the help of the XML comment files. It has been released as open source. You can try taking a look at the code of that tool.


Let's think about this.

The XML comments are never part of the assembly unit. So the 3rd party assembly you are talking about will not have any information for you to extract comments from.

Now, if those assemblies can generate XML files that contain this documentation, probably using SandCastle or nDoc, then you can read those XML files as you are wanting to do.

Next the question is - assuming you have these XML doc files, how to parse them and read them

  • I would suggest to use Linq to XML for quick and easy way to load this documentation. This is better in so many ways than the XSLT processing that SandCastle does. Using Linq to XML to do this shouldn't take that long, as long as you understand the XML schema/hierarchy of the XML doc file

Let me know how that goes OR if you have any questions