private Node getNode()

in proxy/core/src/main/java/com/amazon/aws/pix/core/xml/Iso20022URIDereferencer.java [46:54]


    private Node getNode(String tagName) throws URIReferenceException {
        NodeList nodeList = document.getElementsByTagName(tagName);
        if (nodeList.getLength() == 0) {
            throw new URIReferenceException("No <" + tagName + "> Element detected");
        } else if (nodeList.getLength() > 1) {
            throw new URIReferenceException("Multiple <" + tagName + "> Elements detected");
        }
        return nodeList.item(0);
    }