我正在使用.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