private void removeWhitespace(Document document) throws XPathExpressionException {
document.normalize();
XPath xPath = XPathFactory.newInstance().newXPath();
NodeList nodeList = (NodeList) xPath.evaluate("//text()[normalize-space()='']",
document,
XPathConstants.NODESET);
for (int i = 0; i < nodeList.getLength(); ++i) {
Node node = nodeList.item(i);
node.getParentNode().removeChild(node);
}
}
QrdaGenerator.java 文件源码
java
阅读 20
收藏 0
点赞 0
评论 0
项目:qpp-conversion-tool
作者:
评论列表
文章目录