JDOM中如何设置一个节点的值是<![CDATA[..........]]>类型的
SAXBuilder builder = new SAXBuilder();
Document doc = builder.build(new FileInputStream(cacheFile));
Element root = doc.getRootElement();
Element el=new Element("item");
el.addContent(new Element("title").setText("this is title"));
el.addContent(new Element("link").setText("this is link"));
title 和 link 我需要是 <![CDATA[..........]]>
------解决方案--------------------
4.CDATA的数据写入、读出
element.addContent(new CDATA("<xml> content"));
String noDifference = element.getText();
参考这个看看 http://www.java2000.net/p122