Examples of importNode()


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

  protected final DocumentFragment getImportedComponentFragment(Node targetNode)
  {
    Document targetDocument = targetNode.getOwnerDocument();
   
    // return a deep import
    return (DocumentFragment)targetDocument.importNode(_fragment, true);
  }
 
  private final DocumentFragment _fragment;
}
View Full Code Here

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

            } else {
                Document doc = createDocument();
                // import node must not occur concurrent on the same node (must be its owner)
                // so we need to synchronize on it
                synchronized (node.getOwnerDocument()) {
                    doc.appendChild(doc.importNode(node, true));
                }
                return doc;
            }
            // other element types are not handled
        } else {
View Full Code Here

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

        DocumentFragment fragment = (DocumentFragment)result;

        DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
        DocumentBuilder builder = factory.newDocumentBuilder();
        Document doc = builder.newDocument();
        Node importedFragment = doc.importNode(fragment, true);
        doc.appendChild(doc.createElement("root"));
        doc.getFirstChild().appendChild(importedFragment);

    }
View Full Code Here

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

            target = source.getURI();
            if ( exists == true && this.state == STATE_INSERT ) {
                                message = "content inserted at: " + path;
                resource = SourceUtil.toDOM( source );
                // import the fragment
                Node importNode = resource.importNode(fragment, true);
                // get the node
                Node parent = DOMUtil.selectSingleNode(resource, path);

                // replace?
                if (replacePath != null) {
View Full Code Here

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

                                        resource = parser.createDocument();
                                    } finally {
                                        this.manager.release( (Component)parser );
                                    }

                                    resource.appendChild(resource.importNode(importNode, true));
                                    parent = resource;
                                    replaceNode = resource.importNode(replaceNode, true);
                                } else {
                                    parent.replaceChild(importNode, replaceNode);
                                }
View Full Code Here

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

                                        this.manager.release( (Component)parser );
                                    }

                                    resource.appendChild(resource.importNode(importNode, true));
                                    parent = resource;
                                    replaceNode = resource.importNode(replaceNode, true);
                                } else {
                                    parent.replaceChild(importNode, replaceNode);
                                }
                                message += ", replacing: " + replacePath;
                                if (reinsertPath != null) {
View Full Code Here

Examples of org.w3c.dom.html.HTMLDocument.importNode()

                if (docNameRef.equals("test_referrer_pull") || // Reload
                         docNameRef.equals("test_referrer_pull_next")) // Back button
                {
                    Element outRefElem = docRef.getElementById("outId");
                    Node contentNode = ItsNatDOMUtil.extractChildren(outRefElem);
                    contentNode = doc.importNode(contentNode,true);
                    outElem.appendChild(contentNode);

                    if (docNameRef.equals("test_referrer_pull"))
                    {
                        // Reload
View Full Code Here

Examples of org.w3c.dom.svg.SVGDocument.importNode()

            }
            SVGSVGElement svg = ((SVGDocument) doc).getRootElement();
            SVGDocument targetDoc = (SVGDocument)context.getProperty(SVG_DOCUMENT);
            SVGElement currentPageG = (SVGElement)context.getProperty(SVG_PAGE_G);
            Element view = targetDoc.createElementNS(getNamespace(), "svg");
            Node newsvg = targetDoc.importNode(svg, true);
            //view.setAttributeNS(null, "viewBox", "0 0 ");
            int xpos = ((Integer)context.getProperty(XPOS)).intValue();
            int ypos = ((Integer)context.getProperty(YPOS)).intValue();
            view.setAttributeNS(null, "x", "" + xpos / 1000f);
            view.setAttributeNS(null, "y", "" + ypos / 1000f);
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.