Java tutorial
//package com.java2s; //License from project: Open Source License import org.w3c.dom.CDATASection; import org.w3c.dom.Document; import org.w3c.dom.Node; public class Main { public static void addCDATA(Document document, Node baseNode, String value) { CDATASection cdataSection = document.createCDATASection(value); baseNode.appendChild(cdataSection); } }