How do I make the value of an XElement be wrapped in ![CDATA[***]]?

XCData is a type of XNode. As such, you should try to Add it to the element, rather than set the value (which is documented to be the flattened text content of the element):

xElement.Element(elementName).Add(new XCData(value));

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)