2

Is there any way to add a break to XML documentation without using a <br> tag? In the below example, I want the text in the steps node to be cleanly displayed in the output. Example, line breaks are present in the output:

///<summary> this is a unit test </summary>
///<steps>
/// 1. do something
/// 2. do something else
/// 3. save that something
///</steps>

If I use a <br> tag the tag will be displayed if I open the XML file in IE. At least for now I want to avoid using something like Sandcastle as I have very minimal display needs.

1
  • Thank you for your suggestion. I gave CDATA a try but it did not solve the problem. Commented Aug 26, 2013 at 19:46

1 Answer 1

2

try

///<para>1. Do Something</para>

And

///<para/>1. Do Something 

might also work, for 1-liners anyway.

Now if you want a list…

///<list>
///<item>Do Something</item>
///<item/>Experiment to see if this works
///</list>

Here is a nice, concise article on XML comment tags .

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.