Skip to content

Commit

Permalink
skipping empty child nodes
Browse files Browse the repository at this point in the history
  • Loading branch information
christianmader committed Apr 7, 2017
1 parent 76d19a2 commit 68b7a43
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/main/java/de/fraunhofer/iais/eis/biotope/NodeService.java
Original file line number Diff line number Diff line change
Expand Up @@ -193,6 +193,9 @@ private String innerXml(Node node) {
NodeList childNodes = node.getChildNodes();
StringBuilder sb = new StringBuilder();
for (int i = 0; i < childNodes.getLength(); i++) {
Node childNode = childNodes.item(i);
if (childNode.getTextContent().trim().isEmpty()) continue;

sb.append(lsSerializer.writeToString(childNodes.item(i)));
}
return sb.toString();
Expand Down

0 comments on commit 68b7a43

Please sign in to comment.