I am using a code example block in an XML comment as a simple way to give the user an idea of what the XML looks like. This is a very rough solution and the user will eventually be provided with XML Schema for the xml string. However, for now I'm going to just provide this information in my doxygen-based documentation.
For example, I've got something like this:
/// <example>
/// <code>
/// <!-- xml will go below this comment, but I can't display the comment! -->
/// </code>
/// </example>
When I look at my documentation, any line that has a comment just appears as a blank line.
I've tried escaping with <
and >
, and have also tried using <CDATA[<!-- comment -->]]>
, without success. The escape sequences are displayed as-is, and CDATA
appears as-is, except that the character data is not shown.
What did I miss here? :)
EDIT -- I need to clarify that this is not an issue with Intellisense rendering the information. I would like the XML comments to display properly when rendered by Doxygen into a CHM (via HTML Help Workshop).
I'm not sure where your XML source is appearing, is it in the documentation of a function or class? If so, try wrapping the XML in
verbatim
and\endverbatim
tags. For the following exampleI get the doxygen output: