SAXReader reader = new SAXReader();
Document document = reader.read(new File(path));
Element vcastr = document.getRootElement();
Element channel = vcastr.element("channel");
Element item = channel.element("item");
Element source = item.element("source");
source.setText(tplName);//修改值
XMLWriter output = null;
/** 格式化输出,类型IE浏览一样 */
OutputFormat format = OutputFormat.createPrettyPrint();
/** 指定XML字符集编码 */
format.setEncoding("GBK");
output = new XMLWriter(new FileOutputStream(new File(path)),format);
output.write(document);
output.close();