public static Node getGrandchildNode ( Node parentNode , String childNodeName , String grandChildNodeName , String grandChildNodeValue ) { List < Node > matchingChildren = getChildren ( parentNode , childNodeName , null ) ; for ( Node child : matchingChildren ) { Node matchingGrandChild = getChildNode ( child , grandChildNodeName , grandChildNodeValue ) ; if ( matchingGrandChild != null ) { return matchingGrandChild ; } } return null ; }
Get the matching grand child node