我正在使用.NET Fx 3.5并编写了自己的配置类,它们从ConfigurationSection/ConfigurationElement继承。目前,我最终的东西,看起来像这样在我的配置文件:如何在ConfigurationElement中包含CDATA部分?
<blah.mail>
<templates>
<add name="TemplateNbr1" subject="..." body="Hi!\r\nThis is a test.\r\n.">
<from address="[email protected]" />
</add>
</templates>
</blah.mail>
我想是能够表达身体的template
子节点(在上面的例子中add
节点)至最终的东西,看起来像:
<blah.mail>
<templates>
<add name="TemplateNbr1" subject="...">
<from address="[email protected]" />
<body><![CDATA[Hi!
This is a test.
]]></body>
</add>
</templates>
</blah.mail>
谢谢我会给这个镜头! – cfeduke 2009-01-20 23:14:31