1.用到的jar
2.將xml格式的字符串轉為xml格式
Document doc = DocumentHelper.parseText(result);
3.自己寫公共的節點取值(這里只寫主要只寫代碼)
Node node = doc.selectSingleNode(node_path);
node.getText();
注:有些復雜的處理可以自己研究下
參考資料:https://blog.csdn.net/qq_33532644/article/details/84959272