惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

爱范儿
爱范儿
博客园_首页
W
WeLiveSecurity
S
Secure Thoughts
S
Security @ Cisco Blogs
Recent Commits to openclaw:main
Recent Commits to openclaw:main
Hugging Face - Blog
Hugging Face - Blog
www.infosecurity-magazine.com
www.infosecurity-magazine.com
H
Hacker News: Front Page
Project Zero
Project Zero
cs.CV updates on arXiv.org
cs.CV updates on arXiv.org
U
Unit 42
N
News and Events Feed by Topic
N
News and Events Feed by Topic
Hacker News - Newest:
Hacker News - Newest: "LLM"
Forbes - Security
Forbes - Security
T
Tor Project blog
I
Intezer
B
Blog
F
Full Disclosure
Security Archives - TechRepublic
Security Archives - TechRepublic
F
Fortinet All Blogs
Schneier on Security
Schneier on Security
T
Threat Research - Cisco Blogs
AI
AI
Google DeepMind News
Google DeepMind News
L
LINUX DO - 最新话题
Cloudbric
Cloudbric
L
Lohrmann on Cybersecurity
WordPress大学
WordPress大学
博客园 - 聂微东
雷峰网
雷峰网
P
Privacy International News Feed
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
cs.AI updates on arXiv.org
cs.AI updates on arXiv.org
PCI Perspectives
PCI Perspectives
Y
Y Combinator Blog
Spread Privacy
Spread Privacy
Simon Willison's Weblog
Simon Willison's Weblog
罗磊的独立博客
Vercel News
Vercel News
A
Arctic Wolf
The Register - Security
The Register - Security
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
Microsoft Azure Blog
Microsoft Azure Blog
H
Heimdal Security Blog
Know Your Adversary
Know Your Adversary
P
Proofpoint News Feed
C
Cybersecurity and Infrastructure Security Agency CISA
P
Proofpoint News Feed

博客园 - sun@live

两段代码 <收藏>提高Web性能的14条法则(详细版) MOSS与业务系统的集成 之 单点登录 MOSS与业务系统的集成 之 自定义Membership实现Forms方式验证 手机归属地数据—采集 .Net数据源自定义参数 JavaScript和CSS速查手册 Sandcastle工具SandcastleBuilder 清除字符串数组中,重复元素 - sun@live - 博客园 Windows Live Writer 写的一个双向选择器(JS) 论坛中,用户权限解决方法 (原创)一个改自java的代码统计工具 Web2.0用户注册,激活,密码找回模块 [学习日志]EyasBlog控件部分已基本完成-2005-12-03 学习日志(blog日历控件)-2005年11月12日 学习日志(Blog架构)-2005年11月09日 学习日志-2005年11月09日 学习计划-2005年11月07日
序列化一个字符串到CDATA元素(.NET 1.1)
sun@live · 2007-04-16 · via 博客园 - sun@live

2007-04-16 14:29  sun@live  阅读(667)  评论()    收藏  举报

 

public class CDATA : IXmlSerializable

{

private string text;

public CDATA()

{}

public CDATA(string text)

{

this.text = text;

}

public string Text

{

get { return text; }

}

XmlSchema IXmlSerializable.GetSchema()

{

return null;

}

void IXmlSerializable.ReadXml(XmlReader reader)

{

this.text = reader.ReadString();

}

void IXmlSerializable.WriteXml(XmlWriter writer)

{

writer.WriteCData(this.text);

}

}

[Serializable]

public class ErrorMessage

{

private CDATA message

….

[XmlElement("message", Type=typeof(CDATA))]

public CDATA Message

{

get { return message; }

set { message = value; }

}

….

}