class DOMParserUtil {

    public static List<Node> getNestedChildrenNodesList(Document document, String grandParentNodeName, String parentNodeName, String childNodeName) {
        return asStream(document.getElementsByTagName(childNodeName))
                .filter(childNode -> {
                    Node parentNode = childNode.getParentNode();
                    Node grandParentNode = parentNode.getParentNode();
                    return Objects.equals(parentNodeName, parentNode.getNodeName()) && Objects.equals(grandParentNodeName, grandParentNode.getNodeName());
                }).collect(Collectors.toList());
    }

    private  DOMParserUtil();

}