判断String类型的XML中是否存在某一个节点
package com.wql.test01;
import java.io.IOException;
import javax.xml.parsers.ParserConfigurationException;
import org.dom4j.Document;
import org.dom4j.DocumentException;
import org.dom4j.DocumentHelper;
import org.dom4j.Element;
import org.jdom.JDOMException;
import org.xml.sax.SAXException;
public class TestXMl {
public static void main(String[] args) throws DocumentException, ParserConfigurationException, SAXException, IOException, JDOMException {
String xml = "<?xml version='1.0' encoding='UTF-8'?><root><RESPONSE_CODE>200</RESPONSE_CODE><RESPONSE_MSG>影像统计成功,没有该批次的影像信息</RESPONSE_MSG></root>";
Document document = DocumentHelper.parseText(xml);
Element elementTemplat