Package org.w3c.dom

Examples of org.w3c.dom.Element.insertBefore()


        checkOutElement.appendChild(timeElement);

        Element root = document.getDocumentElement();
        root.insertBefore(dpf.newTextNode(document, "\n"), root.getFirstChild());
        root.insertBefore(checkOutElement, root.getFirstChild());
        root.insertBefore(dpf.newTextNode(document, "\n"), root.getFirstChild());

        setDirty();

        // If this is a checkout, we write back the changed state
        // to the file immediately because otherwise another
View Full Code Here


            Element backupElement = helper.createElement(ELEMENT_BACKUP);
            checkOutElement.appendChild(backupElement);
        }

        Element root = document.getDocumentElement();
        root.insertBefore(checkOutElement, root.getFirstChild());

        setDirty();

        // If this is a checkout, we write back the changed state
        // to the file immediately because otherwise another
View Full Code Here

            Element parentElement= uld.getElementById(parentId);
            if(nextSiblingId==null) {
                parentElement.appendChild(childElement);
            } else {
                Node nextSibling=uld.getElementById(nextSiblingId);
                parentElement.insertBefore(childElement,nextSibling);
            }
            // register element id
            childElement.setIdAttribute(Constants.ATT_ID, true);
            childElement.setAttribute(Constants.ATT_ID, node.getId());
            this.updateCacheKey();
View Full Code Here

            Element parentElement = uld.getElementById(parentId);
            if(nextSiblingId==null) {
                parentElement.appendChild(childElement);
            } else {
                Node nextSibling=uld.getElementById(nextSiblingId);
                parentElement.insertBefore(childElement,nextSibling);
            }
            this.updateCacheKey();

            // propagate the change into the PLF
            Element oldParent = uld.getElementById(oldParentNodeId);
View Full Code Here

            //Get head element's first child.
            Node firstChild = headElem.getFirstChild();

            // Insert title element before it, since title is first element
            // under head in nitf.dtd.
            headElem.insertBefore(titleElem, firstChild);
        }
    }
}

/*
 
View Full Code Here

        rectangle.setAttributeNS(null, "height", "400");
        rectangle.setAttributeNS(null, "style", "fill:none;pointer-events:fill");
        rectangle.setAttributeNS(null, "id", "glasspane");
        Element svgRoot = doc.getDocumentElement();
       
        svgRoot.insertBefore(rectangle, doc.getElementById("rectangles"));

    }
   
    public void registerListeners(JLabel target) {
        //this label provides feedback on the selected item
View Full Code Here

       
        final Element rootDomElement = element.getDomNode();
       
        for( XmlElement child : children )
        {
            rootDomElement.insertBefore( child.getDomNode(), null );
        }
    }
   
    private static void sort( final XmlElement root )
    {
View Full Code Here

       
        final Element rootDomElement = root.getDomNode();
       
        for( XmlElement x : elements )
        {
            rootDomElement.insertBefore( x.getDomNode(), null );
        }
    }
   
    private static void changeSchemaNamespacePrefix( final Document document,
                                                     final String prefix )
View Full Code Here

        
        prevPosition = position - 1;
        prevChild = ( prevPosition < nodes.getLength()) ? nodes.item( prevPosition ) : null;
   
        final Comment comment = document.createComment( commentText );
        domElement.insertBefore( comment, refChild );
       
        final XmlComment wrappedComment = new XmlComment( this, comment );
        this.commentsCache.put( comment, wrappedComment );
        
        if( domElement.getNodeType() == Node.ELEMENT_NODE && domElement.getChildNodes().getLength() == 1 )
View Full Code Here

                descE = doc.createElementNS(SVGConstants.SVG_NAMESPACE_URI,
                                           SVGConstants.SVG_DESC_TAG);
                descE.appendChild(doc.createTextNode(message));

                infoE.insertBefore(descE, infoE.getFirstChild());
                infoE.insertBefore(titleE, descE);
            } catch (Exception ex) {
                throw new BridgeException
                    (bridgeContext, e, ex, ErrorConstants.ERR_URI_IMAGE_BROKEN,
                     new Object[] {url, message });
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.