Package org.w3c.dom

Examples of org.w3c.dom.DocumentFragment.appendChild()


            this.getLayoutDOM();
            if (this.layoutDOM != null) {
                result.appendChild(doc.importNode(this.layoutDOM.getDocumentElement(), true));
            }
            if (this.configurationDOM != null) {
                result.appendChild(doc.importNode(this.configurationDOM.getDocumentElement(), true));
            }

            if (this.statusProfile != null) {
                if (this.copletID != null && this.copletNumber != null) {
                    String statusPath = "customization/coplet[@id='"+copletID+"' and @number='"+copletNumber+"']";
View Full Code Here


                            if (childs != null) {
                                for(int l=0; l<childs.getLength(); l++) {
                                    copletData.appendChild(doc.importNode(childs.item(l), true));
                                }
                            }
                            result.appendChild(copletData);
                        }
                    } catch (javax.xml.transform.TransformerException localException) {
                        throw new ProcessingException("TransformerException: " + localException, localException);
                    }
                }
View Full Code Here

            for(int i = 0; i < list.getLength(); i++) {

                // the found node is either an attribute or an element
                if (list.item(i).getNodeType() == Node.ATTRIBUTE_NODE) {
                    // if it is an attribute simple create a new text node with the value of the attribute
                    result.appendChild(doc.createTextNode(list.item(i).getNodeValue()));
                } else {
                    // now we have an element
                    // copy all children of this element in the resulting tree
                    NodeList childs = list.item(i).getChildNodes();
                    if (childs != null) {
View Full Code Here

                    // now we have an element
                    // copy all children of this element in the resulting tree
                    NodeList childs = list.item(i).getChildNodes();
                    if (childs != null) {
                        for(int m = 0; m < childs.getLength(); m++) {
                            result.appendChild(doc.importNode(childs.item(m), true));
                        }
                    }
                }
            }
        }
View Full Code Here

            throw new ProcessingException("buildProfileDelta: no baseProfile found.");
        }

        originalFragment = (DocumentFragment)originalProfile.get(PortalConstants.PROFILE_PROFILE);
        delta = originalFragment.getOwnerDocument().createDocumentFragment();
        delta.appendChild(delta.getOwnerDocument().createElementNS(null, rootElementName));

        // Copy portal content
        Node profileDelta = DOMUtil.getFirstNodeFromPath(originalFragment, new String[] {"profile","portal-profile"}, false).cloneNode(true);
        delta.getFirstChild().appendChild(profileDelta);
View Full Code Here

        }
        // now create the base profile containing the above profiles
        profileDoc = DOMUtil.createDocument();
        profile = profileDoc.createDocumentFragment();
        profileRoot = profileDoc.createElementNS(null, "profile");
        profile.appendChild(profileRoot);
        profileRoot.appendChild(profileDoc.importNode(DOMUtil.selectSingleNode(layoutFragment,
                                                                  "layout-profile"), true));
        profileRoot.appendChild(profileDoc.importNode(DOMUtil.selectSingleNode(copletsFragment,
                                                                  "coplets-profile"), true));
View Full Code Here

        Element statusProfile = (Element)DOMUtil.getFirstNodeFromPath((DocumentFragment)profile.get(PortalConstants.PROFILE_PROFILE),
                         new String[] {"profile","status-profile"}, false);
        if (res != null && statusProfile != null) {
            DocumentFragment userFragment = statusProfile.getOwnerDocument().createDocumentFragment();
            Element saveStatus = (Element)statusProfile.cloneNode(true);
            userFragment.appendChild(saveStatus);
            // now filter all not persistent coplets!
            NodeList list = DOMUtil.getNodeListFromPath(saveStatus, new String[] {"customization","coplet"});
            String copletID;
            Element coplet;
            Element copletConfig;
View Full Code Here

       
        DocumentFragment fragment = document.createDocumentFragment();
        Element x = document.createElementNS(null, "x");
        Element y = document.createElementNS(null, "y");
        fragment.appendChild(x);
        fragment.appendChild(y);
       
        Element element = document.createElementNS(null, "parent");
        Element a = document.createElementNS(null, "a");
        Element b = document.createElementNS(null, "b");
        element.appendChild(a);
View Full Code Here

        Document document = dbf.newDocumentBuilder().newDocument();
       
        DocumentFragment fragment = document.createDocumentFragment();
        Element x = document.createElementNS(null, "x");
        Element y = document.createElementNS(null, "y");
        fragment.appendChild(x);
        fragment.appendChild(y);
       
        Element element = document.createElementNS(null, "parent");
        Element a = document.createElementNS(null, "a");
        Element b = document.createElementNS(null, "b");
View Full Code Here

       
        DocumentFragment fragment = document.createDocumentFragment();
        Element x = document.createElementNS(null, "x");
        Element y = document.createElementNS(null, "y");
        fragment.appendChild(x);
        fragment.appendChild(y);
       
        Element element = document.createElementNS(null, "parent");
        Element a = document.createElementNS(null, "a");
        Element b = document.createElementNS(null, "b");
        Element c = document.createElementNS(null, "c");
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.