public static Element getParentElement ( Node node ) { Node parent = node . getParentNode ( ) ; return ( parent instanceof Element ? ( Element ) parent : null ) ; }
Gets parent element or null if there is none