Package org.w3c.dom

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


        for( int i=deletes.getLength()-1; i>=0; i-- )
        {
            if ( applyDelete( (Element) deletes.item(i), ilf ) == false )
            {
                dSet.removeChild( deletes.item(i) );
                result.changedPLF = true;
            }
            else
            {
                result.changedILF = true;
View Full Code Here


        if ( deleteAllowed.equals( "false" ) )
            return false;

        Element p = (Element) e.getParentNode();
        e.setIdAttribute(Constants.ATT_ID, false);
        p.removeChild( e );
        return true;
    }

    /**
       Get the delete set if any stored in the root of the document or create
View Full Code Here

            if ( node == null )
                return;
            Element parent = (Element) node.getParentNode();
            if ( parent == null )
                return;
            parent.removeChild( node );
        }
    }

}
View Full Code Here

                Attr attr =  ((Element) child)
                .getAttributeNode( Constants.ATT_NAME );
                if ( attr != null && attr.getValue().equals( attributeName ) )
                {
                    // we found it, remove it
                    editSet.removeChild( child );
                    break;
                }
            }
            child = child.getNextSibling();
        }
View Full Code Here

                    if(keys.contains(name)){
                        e.removeAttribute("select");
                        if (e.hasChildNodes()){
                            NodeList cl = e.getChildNodes();
                            for(int j=cl.getLength()-1;j>=0;j--){
                                e.removeChild(cl.item(j));
                            }
                        }
           e.appendChild( xsl.createTextNode( localization.getString(name) ) );
                        keys.remove(name);
                    }
View Full Code Here

    public void saveToXML(ProcessDefinition definition, Document document) {
        Element root = document.getDocumentElement();
        NodeList nodes = root.getChildNodes();
        if (nodes.getLength() > 0) {
            for (int i = nodes.getLength() - 1; i != 0; i--) {
                root.removeChild(nodes.item(i));
            }
        }
        setAttribute(root, NAME_ATTR, definition.getName());
       
        if (definition.getDescription() != null && definition.getDescription().length() > 0) {
View Full Code Here

            Element fragElt =
                    (Element) contextDocument.importNode(d.getDocumentElement(), true);
            DocumentFragment result = contextDocument.createDocumentFragment();
            Node child = fragElt.getFirstChild();
            while (child != null) {
                fragElt.removeChild(child);
                result.appendChild(child);
                child = fragElt.getFirstChild();
            }
            return result;
        } catch (SAXException se) {
View Full Code Here

      // remove if already set
      Element elm = ( Element )context.getProperty( WSS_USERNAME_TOKEN );
      if( elm != null )
      {
        Element parentNode = ( Element )elm.getParentNode();
        parentNode.removeChild( elm );
      }

      // save it so it can be removed..
      context.setProperty( WSS_USERNAME_TOKEN, setWssUsernameToken( username, password, pwType, doc ) );
    }
View Full Code Here

    else if( pwType != null && context.getProperty( WSS_USERNAME_TOKEN ) != null )
    {
      Element elm = ( Element )context.getProperty( WSS_USERNAME_TOKEN );
      context.removeProperty( WSS_USERNAME_TOKEN );
      Element parentNode = ( Element )elm.getParentNode();
      parentNode.removeChild( elm );
      if( XmlUtils.getChildElements( parentNode ).getLength() == 0 )
        parentNode.getParentNode().removeChild( parentNode );
    }

    // add timestamp?
View Full Code Here

      // remove if already set
      Element elm = ( Element )context.getProperty( WSS_TIMESTAMP_TOKEN );
      if( elm != null )
      {
        Element parentNode = ( Element )elm.getParentNode();
        parentNode.removeChild( elm );
      }

      // save it so it can be removed..
      context.setProperty( WSS_TIMESTAMP_TOKEN, setWsTimestampToken( wsTimestamp, doc ) );
    }
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.