use of com.ximpleware.XMLModifier in project translationstudio8 by heartsome.
the class XLFHandler method deleteAltTrans.
/**
* 删除匹配
* @param xpath
* alter-trans节点中的条件Xpath
*/
public void deleteAltTrans(String xpath) {
Map<String, List<String>> map = RowIdUtil.groupRowIdByFileName(rowIds);
for (Entry<String, List<String>> entry : map.entrySet()) {
try {
VTDUtils vu = new VTDUtils(vnMap.get(entry.getKey()));
xpath = XPATH_ALL_TU + "/alt-trans[" + xpath + "]";
XMLModifier xm = vu.delete(xpath, VTDUtils.PILOT_TO_END);
saveAndReparse(xm, entry.getKey());
} catch (NavException e) {
LOGGER.error("", e);
e.printStackTrace();
}
}
}
Aggregations