src/main/java/org/jboss/util/xml/DOMUtils.java
public static Element getParentElement(Node node)
    {
        Node parent = node.getParentNode();
        return (parent instanceof Element ? (Element)parent : null);
    }
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
@param node
@return the element