Examples of replaceChild()


Examples of org.w3c.dom.Node.replaceChild()

        encryptData(contextDocument, element, false);

        Element encryptedElement = factory.toElement(ed);

        Node sourceParent = element.getParentNode();
        sourceParent.replaceChild(encryptedElement, element);

        return contextDocument;
    }

    /**
 
View Full Code Here

Examples of org.w3c.dom.Node.replaceChild()

     */
    protected void replaceElement(Element currElem, Element newElem) {

        Node clonedNode = XmlUtil.deepClone(currElem, newElem);
        Node parent = currElem.getParentNode();
        parent.replaceChild(clonedNode, currElem);
    }
}

View Full Code Here

Examples of org.w3c.dom.Node.replaceChild()

     */
    protected void replaceElement(Element currElem, Element newElem) {

        Node clonedNode = XmlUtil.deepClone(currElem, newElem);
        Node parent = currElem.getParentNode();
        parent.replaceChild(clonedNode, currElem);
    }
}

View Full Code Here

Examples of org.w3c.dom.Node.replaceChild()

            EntityReference entityRef = fDocument.createEntityReference(entityName);
            ((EntityReferenceImpl)entityRef).setReadOnly(false, false);

            // insert entity ref into tree and append middle text
            Node parent = text.getParentNode();
            parent.replaceChild(entityRef, text1);
            entityRef.appendChild(text1);

            // see if there are any nested entity refs
            if (i < entityCount - 1) {
                int nextEntityOffset = attributes.getEntityOffset(attrIndex, i + 1);
View Full Code Here

Examples of org.w3c.dom.Node.replaceChild()

        if (parent.getLocalName().equals(WSConstants.ENCRYPTED_HEADER)
            && parent.getNamespaceURI().equals(WSConstants.WSSE11_NS)) {
               
            Node decryptedHeader = parent.getFirstChild();
            Node soapHeader = parent.getParentNode();
            soapHeader.replaceChild(decryptedHeader, parent);

            dataRef.setProtectedElement((Element)decryptedHeader);
            dataRef.setXpath(getXPath(decryptedHeader));
        } else if (content) {
            dataRef.setProtectedElement(encData);
View Full Code Here

Examples of org.w3c.dom.Node.replaceChild()

                    XPathFragment childFrag = new XPathFragment(elementName);
                    childFrag.setNamespaceURI(element.getNamespaceURI());
                    newElement = (Element)createElement(parentNode, childFrag, xmlField, valueToWrite, session);

                    if (newElement != element) {
                        parentNode.replaceChild(newElement, element);
                    }
                }
            }
        }
        return nodes;
View Full Code Here

Examples of org.w3c.dom.Node.replaceChild()

        // Copy all Child Elements
        for (Node node = elem.getFirstChild(); node != null; node = node.getNextSibling())
            newElem.appendChild(node.cloneNode(true));
        // insert
        Node parent = elem.getParentNode();
        parent.replaceChild(newElem, elem);
        return true;
    }

}
View Full Code Here

Examples of org.w3c.dom.Node.replaceChild()

    encryptData(_contextDocument, element, false);

        Element encryptedElement = _factory.toElement(_ed);

        Node sourceParent = element.getParentNode();
        sourceParent.replaceChild(encryptedElement, element);

        return (_contextDocument);
    }

    /**
 
View Full Code Here

Examples of org.w3c.dom.Node.replaceChild()

        _contextDocument.removeChild(_contextDocument.getDocumentElement());
        _contextDocument.appendChild(decryptedFragment);
    }
    else {
        sourceParent.replaceChild(decryptedFragment, element);

    }

        return (_contextDocument);
    }
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.