美文网首页
Document 创建与接收

Document 创建与接收

作者: DCMeng | 来源:发表于2019-10-28 10:05 被阅读0次
Document reqDoc = null;
// 格式转换
reqDoc = DocumentHelper.parseText(reqMsg);
// 获取单个内容
ele = ((Element) reqDoc.selectSingleNode("//request/member_code"));
String logisticMemberCode = ele != null ? ele.getTextTrim() : "";
// 获取集合
List<Node> fundOfSubjectList = reqDoc.selectNodes("//request/settlement/funds");
for (Node n : fundOfSubjectList) {
    ele = (Element) n.selectSingleNode("subject_type");
    subjectType = ele != null ? ele.getTextTrim() : "";
}

相关文章

网友评论

      本文标题:Document 创建与接收

      本文链接:https://www.haomeiwen.com/subject/kppvvctx.html