Quantcast
Channel: XML, System.Xml, MSXML and XmlLite forum
Viewing all articles
Browse latest Browse all 935

HOWTO Make XML Comments in C# code preserve paragraphs without weird XML/escaping.

$
0
0

Please help,

I want to use XML comments in my C# code, where I preserve paragraph formatting, including indenting, and not use weird escape of XML notation.

Given the following:

namespace X
{
  class Y
  {
    /**--------------------------------------------------------*\
    |                                                           |
    | <summary>                                                 |
    | I want a nice clean summary, with the "|" pipe character  |
    | swapped out from the beginning of the line, to the end,   |
    | and to cleanly concatenate them into separate paragraphs. |
    |                                                           |
    | And notice this:                                          |
    |   1) One...                                               |
    |   2) Two...                                               |
    |                                                           |
    | </summary>                                                |
    |                                                           |
    \*---------------------------------------------------------*/
    funz Z()
    {
    }
  }
}

From that sample, the <summary> should appear as this:

I want a nice clean summary, with the "|" pipe character swapped out from the beginning of the line, to the end, and to cleanly concatenate them into separate paragraphs.

And notice this: 1) One... 2) Two...

Notice, the indent is kept! Not trimmed. And notice, no weird XML escape characters are added, or the empty lines removed.

Is this possible?



Viewing all articles
Browse latest Browse all 935

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>