//This code for mapping the elements inside xml tag
public static String getLeukemiaInvolvement(String val) {
BiMap<String, String> map = HashBiMap.create();
map.put("01", "6");
map.put("02", "7");
map.put("03", "8");
map.put("04", "9");
map.put("05", "3");
return map.inverse().get(val);
}
for (String data : getListStringValForElementTag(element, "organ-involvement1")) {
if(data != null) {
sectionAmlAllMds.getOrganInvolvement1().add(Pris3BMdmMapper.getLeukemiaInvolvement(data));
}
}
如何确保我的输出不包含空元素?我已经对空元素进行了检查,但它不起作用。我的输出是:
"organInvolvement1": ["01", "04", null, null, "05"]
此代码将读取 XML 标记“organ-involvement1”内的元素数组列表:
getListStringValForElementTag(element, "organ-involvement1")
谢谢
温温酱
哈士奇WWW
繁星点点滴滴
相关分类