Package net.sf.jpluck.xml

Examples of net.sf.jpluck.xml.ContextAdapter.removeAll()


        org.w3c.dom.Document dom = element.getOwnerDocument();
        ContextAdapter ctx = new ContextAdapter(JXPathContext.newContext(element));
        if (!editingDefault) {
            ctx.setValue("name", nameText.getText());
        }
        ctx.removeAll("category");

        Pointer p = ctx.getPointer("description|schedule|transform|autoBookmark");
        for (int i = 0; i < categories.length; i++) {
            Element category = (Element) dom.createElement("category");
            category.appendChild(dom.createTextNode(categories[i]));
View Full Code Here


            populateFeedStructure(element);
        }

        String s = (String) scheduleCombo.getSelectedItem();
        if (s.equals("none")) {
            ctx.removeAll("schedule");
        } else {
            p = ctx.getPointer("schedule");

            Element schedule;
            if (p != null) {
View Full Code Here

            p = ctx.getPointer("schedule");

            Element schedule;
            if (p != null) {
                schedule = (Element) p.getNode();
                ctx.removeAll("schedule/*");
            } else {
                schedule = dom.createElement("schedule");
                p = ctx.getPointer("transform|autoBookmark");
                if (p != null) {
                    element.insertBefore(schedule, (Element) p.getNode());
View Full Code Here

            populateSchedule(dom, schedule);
        }

        if (altTextCheck.isSelected() && (embeddedBppCombo.getSelectedIndex() == 0) &&
                    (standaloneBppCombo.getSelectedIndex() == 0)) {
            ctx.removeAll("images");
        }

        if (altTextCheck.isSelected()) {
            ctx.removeAll("images/@includeAltText");
        } else {
View Full Code Here

                    (standaloneBppCombo.getSelectedIndex() == 0)) {
            ctx.removeAll("images");
        }

        if (altTextCheck.isSelected()) {
            ctx.removeAll("images/@includeAltText");
        } else {
            p = ctx.getPointer("images");
            if (p != null) {
                Element images = (Element) p.getNode();
                images.setAttribute("includeAltText", "no");
View Full Code Here

                }
            }
        }

        if (embeddedBppCombo.getSelectedIndex() == 0) {
            ctx.removeAll("images/embedded");
        } else {
            p = ctx.getPointer("images/embedded");
            Element embedded;
            if (p != null) {
                embedded = (Element) p.getNode();
View Full Code Here

                }
            }
            populateEmbedded(embedded);
        }
        if (standaloneBppCombo.getSelectedIndex() == 0) {
            ctx.removeAll("images/standalone");
        } else {
            p = ctx.getPointer("images/standalone");
            Element standalone;
            if (p != null) {
                standalone = (Element) p.getNode();
View Full Code Here

                    element.insertBefore(uriPatterns, (Element) p.getNode());
                } else {
                    element.appendChild(uriPatterns);
                }
            }
            ctx.removeAll("uriPatterns/*");
            for (int i = 0; i < inclusionPatterns.length; i++) {
                Element include = dom.createElement("include");
                include.appendChild(dom.createTextNode(inclusionPatterns[i]));
                uriPatterns.appendChild(include);
            }
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.