XmlSerializer 实现序列化CDATA

     [XmlIgnore]
public string GuestRemarks { get; set; } [XmlElement("GuestRemarks")]
public XmlNode[] Nodes
{
get
{
var dom = new XmlDocument();
return new XmlNode[] {dom.CreateCDataSection(this.GuestRemarks)};
}
set
{
if (value == null)
{
this.GuestRemarks = null;
return;
} if (value.Length != )
throw new InvalidOperationException("Invalid array.");
var content = value[];
if (null == content)
throw new InvalidOperationException("Node is null.");
this.GuestRemarks = content.Value;
}
}
上一篇:mysql及powerdesigner的初次使用


下一篇:org.springframework.web.filter.DelegatingFilterProxy的作用