Code example for Element

Methods: getChildNodes

0
 
    private boolean verifyTagValue(String elementName, String expectedValue) {
        NodeList tag = this.xmlCommand.getElementsByTagName(elementName);
        if (tag.getLength() != 0) {
            Element commandElmnt = (Element) tag.item(0);
            NodeList commandNm = commandElmnt.getChildNodes();
            if (((Node) commandNm.item(0)).getNodeValue().equals(expectedValue)) {
                return true; 
            } else { 
                return false; 
            } 
        } else { 
            return false; 
        } 
    } 
} 
Connect your IDE to all the code out there  Get Codota for Java