如何在用于C#.Net文档的XML内容中添加换行符

问题描述 投票:0回答:1

我需要在用于C#.Net文档的XML内容中添加换行符,

<summary>
    <example>
        <para> content (wants to add a line break here)</para>
        <code> content </code>
    </example>
</summary>

我该如何添加它? BTW,<para />不适合我。

c# xml
1个回答
0
投票

尝试使用CDATA

 <summary>
        <example>
            <para> <![CDATA[content (wants to add a line break here)&lt; br/ &gt;]]></para>
            <code> content </code>
        </example>
    </summary>

看看这个discussion

© www.soinside.com 2019 - 2024. All rights reserved.