Package org.w3c.dom

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


      Element[] siblings = findContiguousSiblings(element, label, end, false);

      Element blockNode = inputDocument
            .createElement(DexterityConstants.BLOCK);
      parent.replaceChild(blockNode, element);
      element = blockNode;
      // prepare the args
      String[] names = new String[siblings.length];
      String[] values = new String[siblings.length];
View Full Code Here


      Element[] siblings = findContiguousSiblings(element, label, end, false);

      Element blockNode = inputDocument
            .createElement(DexterityConstants.BLOCK);
      parent.replaceChild(blockNode, element);
      element = blockNode;
      // prepare the args
      String[] names = new String[siblings.length];
      String[] values = new String[siblings.length];
View Full Code Here

    }

    newElement.appendChild(embed);
    // replace the current element with this one
    Node parent = element.getParentNode();
    parent.replaceChild(newElement, element);
  }

  static class ParamFilter implements NodeFilter {
    public short acceptNode(Node n) {
      if("param".equalsIgnoreCase(n.getNodeName())) {
View Full Code Here

      if(s.length() > 0 && s.trim().length() == 0) {
        Document d = n.getOwnerDocument();
        Element e = d.createElement(XSLTEXT);
        e.appendChild(d.createTextNode(s));
        Node parent = n.getParentNode();
        parent.replaceChild(e, n);
      }
    } else {
      NodeList nl = n.getChildNodes();
      for(int i = 0; i < nl.getLength(); ++i) {
        Node nn = nl.item(i);
View Full Code Here

        el.setAttribute("name", k);
        el.setAttribute("content", v);
        frag.appendChild(el);
      }
      Node parent = element.getParentNode();
      parent.replaceChild(frag, element);
    }
    catch(IOException e)
    {
      throw new DexterException(e);
    }
View Full Code Here

    // link parent node.
    Node parent = oldEle.getParentNode();
    _tagConverter.convertRefresh(null);
    if (parent != null) {
      // a new element is generated. replace the old one.
      parent.replaceChild(_tagConverter.getResultElement(), oldEle);
    }

    adaptEditProxy();

    // XXX: comment out the if-else for always deep update.
View Full Code Here

      Element htmlLink = doc.createElement(IHTMLConstants.TAG_A);
      htmlLink.setAttribute(ICSSPropertyID.ATTR_HREF, ""); //$NON-NLS-1$
      Text text = doc.createTextNode(middleNode.getNodeValue());
      htmlLink.appendChild(text);
      parentNode.replaceChild(htmlLink, middleNode);
      return htmlLink;
    }

    return null;
  }
View Full Code Here

    encryptData(_contextDocument, element, false);

        Element encryptedElement = _factory.toElement(_ed);

        Node sourceParent = element.getParentNode();
        sourceParent.replaceChild(encryptedElement, element);

        return (_contextDocument);
    }

    /**
 
View Full Code Here

        _contextDocument.removeChild(_contextDocument.getDocumentElement());
        _contextDocument.appendChild(decryptedFragment);
    }
    else {
        sourceParent.replaceChild(decryptedFragment, element);

    }

        return (_contextDocument);
    }
View Full Code Here

    encryptData(_contextDocument, element, false);

        Element encryptedElement = _factory.toElement(_ed);

        Node sourceParent = element.getParentNode();
        sourceParent.replaceChild(encryptedElement, element);

        return (_contextDocument);
    }

    /**
 
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.