Map<String, Object> map = new HashMap<String, Object>();
Object xmlObject = list.get(0).get("processdefcontent");
try {
Document document = DocumentHelper.parseText(xmlObject + "");
List<Node> activityList = document.selectNodes("//Activity");
if(activityList != null){
for(Node node : activityList){
Element activity = (Element) node;
Attribute idAttribute = activity.attribute("id");
Attribute repoAttribute = activity.attribute("repo_id");
map.put(idAttribute.getValue(), repoAttribute.getValue());
}
}
} catch (DocumentException e1) {
return null;
}
xml节点属性值
最新推荐文章于 2021-12-17 19:02:03 发布