Package org.w3c.dom

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


           
            String parentId = getParentId(item);
            assert parentId != null;
               
            ret.add(parentId);
            virtualHardware.removeChild(item);
            logger_.info("Deleted disk info from the ovf file.");
        }
       
        return ret;
    }
View Full Code Here


      if (this._state == MODE_SIGN) {
         Element signatureValueElem = XMLUtils.selectDsNode(this._constructionElement.getFirstChild(),
                                         Constants._TAG_SIGNATUREVALUE,0);
         while (signatureValueElem.hasChildNodes()) {
            signatureValueElem.removeChild(signatureValueElem.getFirstChild());
         }

         String base64codedValue = Base64.encode(bytes);

         if (base64codedValue.length() > 76) {
View Full Code Here

        Element fragElt = (Element) _contextDocument.importNode(
             d.getDocumentElement(), true);
        result = _contextDocument.createDocumentFragment();
        Node child = fragElt.getFirstChild();
        while (child != null) {
          fragElt.removeChild(child);
          result.appendChild(child);
          child = fragElt.getFirstChild();
        }
        // String outp = serialize(d);
View Full Code Here

      if (this._state == MODE_SIGN) {
         Element digestValueElement =XMLUtils.selectDsNode(this._constructionElement.getFirstChild(),
                 Constants._TAG_DIGESTVALUE,0);
         Node n=digestValueElement.getFirstChild();
         while (n!=null) {
               digestValueElement.removeChild(n);
               n = n.getNextSibling();
         }

         String base64codedValue = Base64.encode(digestValue);
         Text t = this._doc.createTextNode(base64codedValue);
View Full Code Here

    if (nl.getLength() == 0) {
      parent.appendChild(document.createElement(child));
    }
    Element ret = (Element) parent.getElementsByTagName(child).item(0);
    if (ret.getFirstChild() != null) {
      ret.removeChild(ret.getFirstChild());
    }
    ret.appendChild(document.createTextNode(value));
    return ret;
  }
View Full Code Here

            collectionElement.setAttributeNS(null, ATTRIBUTE_UUID, getDelegate().getUUID());
        }
        Element[] existingDocumentElements = helper.getChildren(collectionElement,
                ELEMENT_DOCUMENT);
        for (int i = 0; i < existingDocumentElements.length; i++) {
            collectionElement.removeChild(existingDocumentElements[i]);
        }

        collectionElement.setAttribute(ATTRIBUTE_TYPE, getType());
        collectionElement.setAttribute(ATTRIBUTE_HREF, getHref());
        collectionElement.setAttribute(ATTRIBUTE_ALL_LANGUAGES, Boolean.toString(showAllLanguages()));
View Full Code Here

        collectionElement.normalize();

        NodeList emptyTextNodes = XPathAPI.selectNodeList(collectionElement, "text()");
        for (int i = 0; i < emptyTextNodes.getLength(); i++) {
            Node node = emptyTextNodes.item(i);
            node = collectionElement.removeChild(node);
        }

        Document[] documents = getDocuments();
        for (int i = 0; i < documents.length; i++) {
            Element documentElement = createDocumentElement(documents[i], helper);
View Full Code Here

        Element fragElt = (Element) _contextDocument.importNode(
             d.getDocumentElement(), true);
        result = _contextDocument.createDocumentFragment();
        Node child = fragElt.getFirstChild();
        while (child != null) {
          fragElt.removeChild(child);
          result.appendChild(child);
          child = fragElt.getFirstChild();
        }
        // String outp = serialize(d);
View Full Code Here

        for (int i = 0; i < children.getLength(); i++)
        {
            org.w3c.dom.Node nd = children.item(i);
            if (nd.getNodeType() == org.w3c.dom.Node.TEXT_NODE)
            {
                elem.removeChild(nd);
            }
        }

        if (value != null)
        {
View Full Code Here

        this.propertyName = propertyName;
    }

    public void processElement(Element element, BeanDefinitionReader beanDefinitionReader) {
        Element bean = (Element) element.getParentNode();
        bean.removeChild(element);
       
        String name = propertyName;
        if (name == null) {
            name = getElementNameToPropertyName(element);
        }
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.