var cSection = document.createCDATASection('some text for CDATA-section'); var output1 = cSection.nodeType; var output2 = cSection.data;