I have an XML that implements from IXmlSerializable. I want to add a CData property so I can add binary data to the property in the XML. I'm going to pass the XML along and in another application use the binary data.
I know some characters won't be able to translate certain characters but ignoring that fact, how would I achieve this? I tried several ways from stackoverflow but I have been unsuccessful.
[XmlElementAttribute(ElementName = "test", Form = XmlSchemaForm.Unqualified)]
[XmlElement("CDataElement")]
public RawXml test
{
get
{
return test;
}
set
{
test= value;
}
}
byte[] bAry= BinaryData;
item.Property= new CustomXML(bAry);
"item" and "CustomXML" both derive from IXmlSerializable.