private NodeList unpackXML(String xml, String targetTag) throws Exception {
try {
DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance();
DocumentBuilder db = dbf.newDocumentBuilder();
InputSource source = new InputSource();
source.setCharacterStream(new StringReader(xml));
Document doc = db.parse(source);
NodeList nodeList = doc.getElementsByTagName(targetTag);
return nodeList;
} catch (Exception e) {
log.error(e);
log.error(e.getStackTrace());
throw (e);
}
}
CoTAdapterInbound.java 文件源码
java
阅读 26
收藏 0
点赞 0
评论 0
项目:defense-solutions-proofs-of-concept
作者:
评论列表
文章目录