String (@NotNull Node dictNode) { NodeList children = dictNode.getChildNodes(); for (int i = 0; i < children.getLength(); i ++) { Node child = children.item(i); if (child.getNodeType() == Node.ELEMENT_NODE && "key".equals(child.getNodeName()) && "LSHandlerContentType".equals(child.getTextContent())) { Node valueNode = child.getNextSibling(); if (valueNode != null && valueNode.getNodeType() == Node.TEXT_NODE) { valueNode = valueNode.getNextSibling(); } if (valueNode != null) { assert valueNode.getNodeType() == Node.ELEMENT_NODE; return valueNode.getTextContent(); } } } return null; }