public static void ensureChildElement ( DomXmlElement parentElement , DomXmlElement childElement ) { Node parent = childElement . unwrap ( ) . getParentNode ( ) ; if ( parent == null || ! parentElement . unwrap ( ) . isEqualNode ( parent ) ) { throw LOG . elementIsNotChildOfThisElement ( childElement , parentElement ) ; } }
Ensures that the element is child element of the parent element .