Package org.apache.xmlbeans

Examples of org.apache.xmlbeans.XmlCursor.removeAttribute()


     */
    public static void setPassword(XmlObject xobj, String password, HashAlgorithm hashAlgo, String prefix) {
        XmlCursor cur = xobj.newCursor();

        if (password == null) {
            cur.removeAttribute(getAttrName(prefix, "password"));
            cur.removeAttribute(getAttrName(prefix, "algorithmName"));
            cur.removeAttribute(getAttrName(prefix, "hashValue"));
            cur.removeAttribute(getAttrName(prefix, "saltValue"));
            cur.removeAttribute(getAttrName(prefix, "spinCount"));
            return;
View Full Code Here


    public static void setPassword(XmlObject xobj, String password, HashAlgorithm hashAlgo, String prefix) {
        XmlCursor cur = xobj.newCursor();

        if (password == null) {
            cur.removeAttribute(getAttrName(prefix, "password"));
            cur.removeAttribute(getAttrName(prefix, "algorithmName"));
            cur.removeAttribute(getAttrName(prefix, "hashValue"));
            cur.removeAttribute(getAttrName(prefix, "saltValue"));
            cur.removeAttribute(getAttrName(prefix, "spinCount"));
            return;
        }
View Full Code Here

        XmlCursor cur = xobj.newCursor();

        if (password == null) {
            cur.removeAttribute(getAttrName(prefix, "password"));
            cur.removeAttribute(getAttrName(prefix, "algorithmName"));
            cur.removeAttribute(getAttrName(prefix, "hashValue"));
            cur.removeAttribute(getAttrName(prefix, "saltValue"));
            cur.removeAttribute(getAttrName(prefix, "spinCount"));
            return;
        }
       
View Full Code Here

        if (password == null) {
            cur.removeAttribute(getAttrName(prefix, "password"));
            cur.removeAttribute(getAttrName(prefix, "algorithmName"));
            cur.removeAttribute(getAttrName(prefix, "hashValue"));
            cur.removeAttribute(getAttrName(prefix, "saltValue"));
            cur.removeAttribute(getAttrName(prefix, "spinCount"));
            return;
        }
       
        cur.toFirstContentToken();
View Full Code Here

        if (password == null) {
            cur.removeAttribute(getAttrName(prefix, "password"));
            cur.removeAttribute(getAttrName(prefix, "algorithmName"));
            cur.removeAttribute(getAttrName(prefix, "hashValue"));
            cur.removeAttribute(getAttrName(prefix, "saltValue"));
            cur.removeAttribute(getAttrName(prefix, "spinCount"));
            return;
        }
       
        cur.toFirstContentToken();
        if (hashAlgo == null) {
View Full Code Here

    static void rectifyPlan(GerConnectorType gerConnector) {
        boolean updated = false;
        XmlCursor cursor = gerConnector.newCursor();
        try {
            updated = cursor.removeAttribute(VERSION_QNAME);
        } finally {
            cursor.dispose();
        }
        GerResourceadapterType[] resourceAdapters = gerConnector.getResourceadapterArray();
        for (int i = 0; i < resourceAdapters.length; i++) {
View Full Code Here

                    NamedNodeMap attributes = elm.getAttributes();
                    if (attributes != null && attributes.getLength() > 0) {
                        for (int c = 0; c < attributes.getLength(); c++) {
                            Node node = attributes.item(c);
                            if (node.getNodeValue() == null || node.getNodeValue().trim().length() == 0) {
                                cursor.removeAttribute(XmlUtils.getQName(node));
                                removed = true;
                            }
                        }
                    }
View Full Code Here

        xmlCursor.push();
        try {
            //munge xml
            if (xmlCursor.toChild(LOGIN_MODULE_QNAME)) {
                do {
                    xmlCursor.removeAttribute(SERVER_SIDE_QNAME);
                } while (xmlCursor.toNextSibling(LOGIN_MODULE_QNAME));
            }
            xmlCursor.pop();
            //validate
            XmlOptions xmlOptions = new XmlOptions();
View Full Code Here

                        cursor.push();
                        cursor.toEndToken();
                        cursor.toNextToken();
                        if (source.toChild(PRINCIPAL_QNAME)) {
                            do {
                                source.removeAttribute(DESIGNATED_RUN_AS);
                                source.copyXml(cursor);
                            } while (source.toNextSibling(PRINCIPAL_QNAME));
                        }

                        cursor.pop();
View Full Code Here

        xmlCursor.push();
        try {
            //munge xml
            if (xmlCursor.toChild(LOGIN_MODULE_QNAME)) {
                do {
                    xmlCursor.removeAttribute(SERVER_SIDE_QNAME);
                } while (xmlCursor.toNextSibling(LOGIN_MODULE_QNAME));
            }
            xmlCursor.pop();
            //validate
            XmlOptions xmlOptions = new XmlOptions();
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.