CoTAdapterInbound.java 文件源码

java
阅读 26 收藏 0 点赞 0 评论 0

项目:defense-solutions-proofs-of-concept 作者:
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);
    }
}
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号