Java examples for XML:CDATA
Create cdata Content Tag
//package com.java2s; import org.w3c.dom.Element; public class Main { public static void cdataContentTag(Element parent, String tagName, String cdata) {// w w w.j a va2 s . com Element tag = parent.getOwnerDocument().createElement(tagName); tag.appendChild(parent.getOwnerDocument().createCDATASection(cdata)); parent.appendChild(tag); } static public Element createElement(Element parent, String tagName) { Element tag = parent.getOwnerDocument().createElement(tagName); parent.appendChild(tag); return tag; } }