XSD.EXE tool. One of the elements will have its "inner text" set to a CDATA
block. The XSD.EXE tool exposed a "Value" property on that element to allow
setting that inner text. After I create the object hierarchy and specify all
the appropriate elements, attributes, etc., I serialize the objects to a .xml
file using XmlSerializer.
If I simply specify the "element.Value" property to the string data (what
should go inside the CDATA), the string simply becomes the inner text - it's
not wrapped in the CDATA delimiters. So it would appear that the classes
generated by XSD.EXE either can't or don't have enough information to
automatically wrap the data in a CDATA.
If I try to manually wrap the string data by specifying element.Value as
"<![CDATA[" + string + "]]>", the '<' and '>' characters get encoded as < and
respectively when I serialize the object to an XML file.Is there a way to get the behavior I need - that is, the string data is
properly wrapped in the CDATA markers to create a valid element with CDATA
inner text?
Thanks,
Donnie