Java XML CDATA Add addCDATA(final String xML)

Here you can find the source of addCDATA(final String xML)

Description

add CDATA

License

Apache License

Declaration

public static String addCDATA(final String xML) 

Method Source Code

//package com.java2s;
//License from project: Apache License 

public class Main {
    public static String addCDATA(final String xML) {
        String cStart = "<![CDATA[";
        String cEnd = "]]>";

        return new StringBuilder().append(cStart).append(xML).append(cEnd).toString();

    }/*from   w  ww .j  a  v a  2 s  . co m*/
}

Related

  1. addCData(String xml)
  2. addCDATAElement(Node parent, String name, String data, Attr[] attrs)
  3. addCdataNode(Element element, String tagName, String value)
  4. addCDATAstring(String value)