Skip to content

Commit

Permalink
fixed
Browse files Browse the repository at this point in the history
Issue #353
  • Loading branch information
rsoika committed Aug 15, 2024
1 parent 1229bc7 commit 4a0bd9c
Showing 1 changed file with 6 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -130,18 +130,20 @@ public void onLoad(BPMNModel model, Path path) {
* @return
*/
private String getElementContent(Element element) {
// search CDATA node
// collect all the node content
// This can again include CData sections! (see issue #)
String result = "";
NodeList childNodes = element.getChildNodes();
for (int i = 0; i < childNodes.getLength(); i++) {
Node node = childNodes.item(i);
if (node instanceof CDATASection) {
return node.getNodeValue();
result = result + node.getNodeValue();
} else {
// normal text node
return node.getTextContent();
result = result + node.getTextContent();
}
}
return "";
return result;
}

/**
Expand Down

0 comments on commit 4a0bd9c

Please sign in to comment.