Examples of adoptNode()


Examples of org.w3c.dom.Document.adoptNode()

       
        Element assertionEl = assertion.toDOM(newDoc);
        root.appendChild(assertionEl);
       
        payloadDoc.removeChild(docEl);
        newDoc.adoptNode(docEl);
        root.appendChild(docEl);

        if (signLater) {
            // It appears adopting and removing nodes
            // leaves some stale refs/state with adopted nodes and thus the digest ends up
View Full Code Here

Examples of org.w3c.dom.Document.adoptNode()

                signedEl.removeAttribute("ID");
                root.removeChild(signatureElement);
            } else {
                Element actualBody = getActualBody(root);
                Document newDoc = DOMUtils.createDocument();
                newDoc.adoptNode(actualBody);
                root = actualBody;
            }
        }
        message.setContent(XMLStreamReader.class,
                           new W3CDOMStreamReader(root));
View Full Code Here

Examples of org.w3c.dom.Document.adoptNode()

            message.setContent(InputStream.class, null);
        } else {
            Element actualBody = getActualBody(doc.getDocumentElement());
            if (actualBody != null) {
                Document newDoc = DOMUtils.createDocument();
                newDoc.adoptNode(actualBody);
                message.setContent(XMLStreamReader.class,
                        new W3CDOMStreamReader(actualBody));
                message.setContent(InputStream.class, null);
            }
        }
View Full Code Here

Examples of org.w3c.dom.Document.adoptNode()

    Element innerDiv = doc.createElement("div");
    innerDiv.setAttribute("id", "caja_innerContainer___");
    innerDiv.setAttribute("class", "g___");
    outerDiv.appendChild(innerDiv);

    innerDiv.appendChild(doc.adoptNode(result.html));

    String cajoledJs = renderJs(result.js, debug);
    cajoledOutput.appendChild(cajaStart(doc, cajoledJs, debug));

    createContainerFor(doc, cajoledOutput);
View Full Code Here

Examples of org.w3c.dom.Document.adoptNode()

            attrName.append(elName.getPrefix());
            el.setAttribute(attrName.toString(), elName.getNamespaceURI());
        }

        for (Element part : childEl) {
            Node adoptedNode = doc.adoptNode(part);
            el.appendChild(adoptedNode);
        }

        return el;
    }   
View Full Code Here

Examples of org.w3c.dom.Document.adoptNode()

                        newDoc = parserPool.newDocument();
                    } catch (XMLParserException e) {
                        log.error("There was an error creating a new DOM Document", e);
                        throw new DecryptionException("Error creating new DOM Document", e);
                    }
                    newDoc.adoptNode(element);
                    newDoc.appendChild(element);
                }
            }

            try {
View Full Code Here

Examples of org.w3c.dom.Document.adoptNode()

                signedEl.removeAttribute("ID");
                root.removeChild(signatureElement);
            } else {
                Element actualBody = getActualBody(root);
                Document newDoc = DOMUtils.createDocument();
                newDoc.adoptNode(actualBody);
                root = actualBody;
            }
        }
        message.setContent(XMLStreamReader.class,
                           new W3CDOMStreamReader(root));
View Full Code Here

Examples of org.w3c.dom.Document.adoptNode()

                                                    String sigAlgo,
                                                    String digestAlgo) throws Exception {
        Element docEl = doc.getDocumentElement();
        Document newDoc = DOMUtils.createDocument();
        doc.removeChild(docEl);
        newDoc.adoptNode(docEl);
        Element object = newDoc.createElementNS(Constants.SignatureSpecNS, "ds:Object");
        object.appendChild(docEl);
        docEl.setAttributeNS(null, "Id", id);
        docEl.setIdAttributeNS(null, "Id", true)
       
View Full Code Here

Examples of org.w3c.dom.Document.adoptNode()

            String sigAlgo,
            String digestAlgo) throws Exception {
        Element docEl = doc.getDocumentElement();
        Document newDoc = DOMUtils.createDocument();
        doc.removeChild(docEl);
        newDoc.adoptNode(docEl);
        docEl.setAttributeNS(null, "Id", id);
        docEl.setIdAttributeNS(null, "Id", true)
       
        Element root = newDoc.createElementNS(envelopeQName.getNamespaceURI(),
                envelopeQName.getPrefix() + ":" + envelopeQName.getLocalPart());
View Full Code Here

Examples of org.w3c.dom.Document.adoptNode()

                signedEl.removeAttribute("ID");
                root.removeChild(signatureElement);
            } else {
                Element actualBody = getActualBody(root);
                Document newDoc = DOMUtils.createDocument();
                newDoc.adoptNode(actualBody);
                root = actualBody;
            }
        }
        message.setContent(XMLStreamReader.class,
                           new W3CDOMStreamReader(root));
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.