How is this done?
i read about it here: CDATA I've tried:
var XML = document.createElement("testing");
var NodeSystemOut = document.createElement("system-out");
var cdata = document.createCDATASection
('<p>Good relations have I with the Wookies</p>');
NodeSystem.appendChild(cdata);
XML.appendChild(NodeSystem);
but this does not work.
any ideas? javascript noob
doc.createCDATASectionis working for me from that example (wheredocis a valid XML document instance)document.createElementAPI to create XML unlessdocumentis an XML document. Which unless you've gone through specific lengths to do so will NOT let you usecreateCDATASection. Look through the answer linked for a better example of how to do what you're trying to do.