【问题标题】:cleanly adding line breaks to XML comments in visual studio在 Visual Studio 中干净地为 XML 注释添加换行符
【发布时间】:2013-08-26 18:56:27
【问题描述】:

有什么方法可以在不使用 br 标记的情况下为 xml 文档添加中断?在下面的示例中,我希望将步骤节点中的文本清晰地显示在输出中。例如,输出中存在换行符

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

如果我使用 br 标签,当我在 IE 中打开 xml 文件时会显示该标签。至少现在我想避免使用沙堡之类的东西,因为我的显示需求非常少。

【问题讨论】:

  • 感谢您的建议。我尝试了 CDATA,但没有解决问题。

标签: xml visual-studio documentation xmldocument


【解决方案1】:

试试

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

还有

///<para/>1. Do Something 

也可能适用于 1-liners。

现在如果你想要一个列表……

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

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

【讨论】:

    猜你喜欢
    • 2021-06-16
    • 1970-01-01
    • 2021-12-27
    • 2013-03-25
    • 1970-01-01
    • 1970-01-01
    • 2014-08-04
    • 2010-10-06
    • 1970-01-01
    相关资源
    最近更新 更多