Package org.jdom

Examples of org.jdom.Element.removeContent()


                       
                        List<Element> elementsInContextMatching = new ArrayList<Element>();
                        for (Element match : elementsInContextMatching) {
                            Element parent = match.getParentElement();
                            while(parent != null) {
                                parent.removeContent();
                                parent.addContent((Element)match.clone());
                                match = (Element)parent.clone();
                                parent = parent.getParentElement();
                            }
                            elementsInContextMatching.add(match);
View Full Code Here


    if (configElement == null) {
      configElement = new Element(TAG);
      element.addContent(configElement);
    }

    configElement.removeContent();

    for (Element e : configuration.getConfigurationElements())
      configElement.addContent(e);
  }
View Full Code Here

      return;
    }
    Element root = doc.getRootElement();
    Element referenceElement = extractReference(root, artefact
        .getReferenceId());
    referenceElement.removeContent();
    referenceElement.setContent(reference.getElement().cloneContent());

    try {
      save(doc, file);
    } catch (FileNotFoundException e) {
View Full Code Here

            return;
        }
        Element tagElem = elem.getChild(tagName, elem.getNamespace());
        if (tagElem != null) {
            String updated = CoordELFunctions.evalAndWrap(eval, tagElem.getText());
            tagElem.removeContent();
            tagElem.addContent(updated);
        }
        else {
            log.warn(" Value NOT FOUND " + tagName);
        }
View Full Code Here

            return;
        }
        Element tagElem = elem.getChild(tagName, elem.getNamespace());
        if (tagElem != null) {
            String updated = CoordELFunctions.evalAndWrap(eval, tagElem.getText());
            tagElem.removeContent();
            tagElem.addContent(updated);
        }
        else {
            XLog.getLog(CoordActionInputCheckXCommand.class).warn(" Value NOT FOUND " + tagName);
        }
View Full Code Here

            return;
        }
        Element tagElem = elem.getChild(tagName, elem.getNamespace());
        if (tagElem != null) {
            String updated = CoordELFunctions.evalAndWrap(eval, tagElem.getText());
            tagElem.removeContent();
            tagElem.addContent(updated);
        }
        else {
            XLog.getLog(CoordActionInputCheckXCommand.class).warn(" Value NOT FOUND " + tagName);
        }
View Full Code Here

            return;
        }
        Element tagElem = elem.getChild(tagName, elem.getNamespace());
        if (tagElem != null) {
            String updated = CoordELFunctions.evalAndWrap(eval, tagElem.getText());
            tagElem.removeContent();
            tagElem.addContent(updated);
        }
        else {
            LOG.warn(" Value NOT FOUND " + tagName);
        }
View Full Code Here

   * Internal method to simplify code read.
   */
  private Element internalSaveTokens(Element toOverwrite, String folderName, String folderIdDB, String folderIdGraph, String ownerID, String hasSEL, String cryptedAclBEL, String cryptedAclSEL){
    //Create token
    Element el = (toOverwrite == null) ? new Element("Folder") : toOverwrite;
    el.removeContent();

    //Insert folder ID
    Element elFolderId = new Element("folderIdDB");
    elFolderId.setText(folderIdDB);
    el.addContent(elFolderId);
View Full Code Here

        int index = parent.indexOf(element);

        parent.addContent(index, new Text(postpend));
        parent.addContent(index, element.removeContent());
        parent.addContent(index, new Text(prepend.toString()));
        parent.removeContent(element);
      }
    } else {
      // If it's not an element just remove the content from the document.
      Element parent = content.getParentElement();
      parent.removeContent(content);
View Full Code Here

        parent.removeContent(element);
      }
    } else {
      // If it's not an element just remove the content from the document.
      Element parent = content.getParentElement();
      parent.removeContent(content);
    }
  }

  /**
   * Wrap the given set of contents into a paragraph and place it at the
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.