Package org.w3c.dom

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


                injectAttributeParameters(params, soapNs, node, attributes);
                injectParameters((Element) node, params, soapNs, nils);
                Comment comment = YADOMUtil.getCommentBefore((Element) node);
                if(comment != null && comment.getTextContent().endsWith(SOAPUI_OPTIONAL_COMMENT + REMOVE_POSTFIX)) {
                    Node parent = node.getParentNode();
                    parent.removeChild(node);
                    parent.removeChild(comment);
                    childCount -= 2;
                    i -= 2;
                }
            }
View Full Code Here


                injectParameters((Element) node, params, soapNs, nils);
                Comment comment = YADOMUtil.getCommentBefore((Element) node);
                if(comment != null && comment.getTextContent().endsWith(SOAPUI_OPTIONAL_COMMENT + REMOVE_POSTFIX)) {
                    Node parent = node.getParentNode();
                    parent.removeChild(node);
                    parent.removeChild(comment);
                    childCount -= 2;
                    i -= 2;
                }
            }
        }
View Full Code Here

                                    visibleElem = statusElem.getOwnerDocument().createElementNS(null, "visible");
                                    statusElem.appendChild(visibleElem);
                                }
                                // remove old childs
                                while (visibleElem.hasChildNodes()) {
                                    visibleElem.removeChild(visibleElem.getFirstChild());
                                }
                                visibleElem.appendChild(statusElem.getOwnerDocument().createTextNode("true"));
                            }
                        }
                    }
View Full Code Here

                        NodeList childs = currentProfile.getChildNodes();
                        int      index, max;
                        max = childs.getLength();
                        for(index = max - 1; index >= 0; index--) {
                            if (childs.item(index).getNodeType() == Node.TEXT_NODE) {
                                currentProfile.removeChild(childs.item(index));
                            }
                        }
                        childs = currentDelta.getChildNodes();
                        max = childs.getLength();
                        for(index = 0; index < max; index++) {
View Full Code Here

    public ElementToValueProcessor() {
    }

    public void processElement(Element element, BeanDefinitionReader beanDefinitionReader) {
        Node root = element.getParentNode();
        root.removeChild(element);

        Element value = addElement((Element) root, "value");
        value.appendChild(value.getOwnerDocument().createTextNode(DOMUtil.getElementText(element)));
    }
View Full Code Here

                return;
            }
        }
       
        Node parent = securityHeader.getParentNode();
        parent.removeChild(securityHeader);
    }
   
}
View Full Code Here

            Node importNode = elem;
            ns.add(importNode);
        }
        for (Node item : ns) {
            Node schemaNode = item.getParentNode();
            schemaNode.removeChild(item);
        }
       
        incElemList = DOMUtils.findAllElementsByTagNameNS(element,
                                                       ToolConstants.SCHEMA_URI,
                                                       "include");
View Full Code Here

    Node node = findNode(queryString);
    if (node == null)
      return null;
    String returnValue = node.getTextContent();
    Node parent = node.getParentNode();
    parent.removeChild(node);
    return returnValue;
  }
 
 
  protected boolean containsValue (String value) {
View Full Code Here

  public void removeShape(ShapeModel model) {
    Node shape = this.find("shape", model.getId());
   
    if (shape != null) {
      Node parent = shape.getParentNode();
      parent.removeChild(shape);
 
      // now finally save document
      XmlUtils.saveXml(this.getDocument(), this.grammar.getCurrentFileName());
    }
  }
View Full Code Here

  public void saveShape(ShapeModel model) {
    Node shape = this.find("shape", model.getId());

    if (shape != null) {
      Node parent = shape.getParentNode();
      parent.removeChild(shape);
      parent.appendChild(parent.getOwnerDocument().importNode(
          model.getXml(), true));
    } else {
      this.addShape(model);
    }
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.