Package org.dom4j

Examples of org.dom4j.Element.clearContent()


    if (elem == null) {
      // missing, we add it
      elem = xmlDoc.getRootElement().addElement(
          new QName(KEYWORD_REVISION, namespaceCoreProperties));
    } else {
      elem.clearContent();// clear the old value
    }
    elem.addText(propsPart.getRevisionProperty().getValue());
  }

  /**
 
View Full Code Here


    if (elem == null) {
      // missing, we add it
      elem = xmlDoc.getRootElement().addElement(
          new QName(KEYWORD_SUBJECT, namespaceDC));
    } else {
      elem.clearContent();// clear the old value
    }
    elem.addText(propsPart.getSubjectProperty().getValue());
  }

  /**
 
View Full Code Here

    if (elem == null) {
      // missing, we add it
      elem = xmlDoc.getRootElement().addElement(
          new QName(KEYWORD_TITLE, namespaceDC));
    } else {
      elem.clearContent();// clear the old value
    }
    elem.addText(propsPart.getTitleProperty().getValue());
  }

  private void addVersion() {
View Full Code Here

    if (elem == null) {
      // missing, we add it
      elem = xmlDoc.getRootElement().addElement(
          new QName(KEYWORD_VERSION, namespaceCoreProperties));
    } else {
      elem.clearContent();// clear the old value
    }
    elem.addText(propsPart.getVersionProperty().getValue());
  }
}
View Full Code Here

    if (elem == null) {
      // Missing, we add it
      elem = xmlDoc.getRootElement().addElement(
          new QName(KEYWORD_CATEGORY, namespaceCoreProperties));
    } else {
      elem.clearContent();// clear the old value
    }
    elem.addText(propsPart.getCategoryProperty().getValue());
  }

  /**
 
View Full Code Here

    if (elem == null) {
      // Missing, we add it
      elem = xmlDoc.getRootElement().addElement(
          new QName(KEYWORD_CONTENT_STATUS, namespaceCoreProperties));
    } else {
      elem.clearContent();// clear the old value
    }
    elem.addText(propsPart.getContentStatusProperty().getValue());
  }

  /**
 
View Full Code Here

        DocumentHelper documentHelper = new DocumentHelper();

        dateE = DocumentHelper.makeElement(doc, "/article/head/dateline/story.date");

        dateE.clearContent();

        //set the PublishedDate
        dateE.addAttribute("year", year);

        dateE.addAttribute("month", month);
View Full Code Here

        DocumentHelper documentHelper = new DocumentHelper();

        //get the RevisionDate Node
        Element dateE = DocumentHelper.makeElement(doc,
                "/NewsML/NewsItem/NewsManagement/RevisionDate");
        dateE.clearContent();

        //set the RevisionDate
        dateE.addAttribute("year", year);
        dateE.addAttribute("month", month);
        dateE.addAttribute("day", day);
View Full Code Here

        int num = Integer.parseInt(id);
        num = num + 1;

        String newId = new Integer(num).toString();

        revIdE.clearContent();

        //set the Revision id
        revIdE.addAttribute("PreviousRevision", id);
        revIdE.addAttribute("Update", "N");
        revIdE.setText(newId);
View Full Code Here

        DocumentHelper documentHelper = new DocumentHelper();

        dateE = DocumentHelper.makeElement(doc,
                "/NewsML/NewsItem/NewsComponent/ContentItem/DataContent/nitf/body/body.head/dateline/story.date");
        dateE.clearContent();

        //set the PublishedDate
        dateE.addAttribute("year", year);
        dateE.addAttribute("month", month);
        dateE.addAttribute("day", day);
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.