validateDD(xmlObject);
    public static WebAppDocument convertToServletSchema(XmlObject xmlObject) {        XmlCursor cursor = xmlObject.newCursor();        XmlCursor moveable = xmlObject.newCursor();        String schemaLocationURL = "http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd";        String version = "2.4";        try {            convertToSchema(cursor, schemaLocationURL, version);            cursor.toStartDoc();            cursor.toChild(J2EE_NAMESPACE, "web-app");            cursor.toFirstChild();            convertToDescriptionGroup(cursor, moveable);            convertToJNDIEnvironmentRefsGroup(cursor, moveable);            while (cursor.toNextSibling()) {                String name = cursor.getName().getLocalPart();                if ("filter".equals(name) || "servlet".equals(name)) {                    cursor.push();                    cursor.toFirstChild();                    convertToDescriptionGroup(cursor, moveable);                    if (cursor.toNextSibling(J2EE_NAMESPACE, "init-param")) {                        cursor.toFirstChild();                        convertToDescriptionGroup(cursor, moveable);                    }                    cursor.pop();                }            }        } finally {            cursor.dispose();        }        XmlObject result = xmlObject.changeType(WebAppDocument.type);        if (result != null) {            return (WebAppDocument) result;        }        return (WebAppDocument) xmlObject;    }