Quantcast
Channel: XML, System.Xml, MSXML and XmlLite forum
Viewing all articles
Browse latest Browse all 935

Serialize XML from Object (need to create: type and ![CDATA[)

$
0
0

How can i create a line like this:

<ATTRIBUTE type="Size"><![CDATA["One Size"]]></ATTRIBUTE>

I dont know how create the type and CData. Currently I have the following classes:

public class ATTRIBUTES
        {
            public ATTRIBUTE ATTRIBUTE;
        }

        public class ATTRIBUTE
        {
            public string ATTR { get; set; }
        }
I need to end up with something like the following.

<ATTRIBUTES><ATTRIBUTE type="Colour"><![CDATA["Black"]]></ATTRIBUTE><ATTRIBUTE type="Size"><![CDATA["One Size"]]></ATTRIBUTE></ATTRIBUTES>

Thanks


Viewing all articles
Browse latest Browse all 935

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>