Friday, November 18, 2011

Creating CDATA in Class file Property

private string aDDRESS;
[XmlIgnore]
public string ADDRESS
{
get;
set;
}
[XmlElement("ADDRESS")]
public XmlCDataSection ADDRESS_CDATA
{
get
{
XmlDocument _doc = new XmlDocument();
return _doc.CreateCDataSection(ADDRESS);
}
set
{
this.aDDRESS= value.Value;
}
}

No comments: