florrerablog
New Member
I've got a PS script that creates some XML and assigns values to the XElements. I need the value of the XElement to be wrapped in CData. This is using System.Xml.LinqI tried this:\[code\]$newNode.Element("details").Value = 'http://stackoverflow.com/questions/12643005/<![CDATA[Traceback:'+$_.Exception.toString()+']]>'\[/code\]but when I output the xml, it converts the '<' and '>' to < and >.