Package org.dom4j

Examples of org.dom4j.Document.addComment()


  }

  public static Document createDocument() {
    Document document = DocumentHelper.createDocument();
    document.setXMLEncoding("UTF-8");
    document.addComment(LangExport.FILE_COMMENT);
    return document;
  }
 
  public static Element createRoot(Document document) {
    Element root = document.addElement("language");
View Full Code Here


      try {
        rb = ResourceBundle.getBundle("com.gi.engine.parameters");
      } catch (Exception e) {
      }
      try {
        document.addComment(rb.getString("CONTACT"));
      } catch (Exception e) {
      }
      try {
        root.addAttribute("version", rb.getString("VERSION"));
      } catch (Exception e) {
View Full Code Here

      try {
        rb = ResourceBundle.getBundle("com.gi.engine.parameters");
      } catch (Exception e) {
      }
      try {
        document.addComment(rb.getString("CONTACT"));
      } catch (Exception e) {
      }
      try {
        root.addAttribute("version", rb.getString("VERSION"));
      } catch (Exception e) {
View Full Code Here

   *
   * @return the Dom4j document containing the XML Schema.
   */
  public Document getSchema() {
    final Document doc = XMLUtil.getInstance().createDomDocument();
    doc
        .addComment("\n* ***********************************************************************************\n"
            + "* Copyright (C) 2001-2009 Openbravo S.L. Licensed under the Apache Software\n"
            + "* License version 2.0 You may obtain a copy of the License at\n"
            + "* http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law\n"
            + "* or agreed to in writing, software distributed under the License is\n"
View Full Code Here

                case XmlPullParser.COMMENT: {
                    if (parent != null) {
                        parent.addComment(pp.getText());
                    } else {
                        document.addComment(pp.getText());
                    }

                    break;
                }
View Full Code Here

/* 384 */         break;
/*     */       case 9:
/* 388 */         if (parent != null)
/* 389 */           parent.addComment(pp.getText());
/*     */         else {
/* 391 */           document.addComment(pp.getText());
/*     */         }
/*     */
/* 394 */         break;
/*     */       case 5:
/* 398 */         if (parent != null) {
View Full Code Here

  public void xmlReplace() {
    try {
     
      Document document = DocumentHelper.createDocument();
      document.setXMLEncoding("UTF-8");
      document.addComment(
          "###############################################\n" +
          "This File is auto-generated by the Backup Tool \n" +
          "you should use the BackupPanel to modify or change this file \n" +
          "see http://incubator.apache.org/openmeetings/Upgrade.html for Details \n" +
          "###############################################");
View Full Code Here

  }

  public Document createDocument(List<Fieldlanguagesvalues> flvList, List<Fieldlanguagesvalues> untranslatedList) throws Exception {
    Document document = DocumentHelper.createDocument();
    document.setXMLEncoding("UTF-8");
    document.addComment("###############################################\n"
        + "This File is auto-generated by the LanguageEditor \n"
        + "to add new Languages or modify/customize it use the LanguageEditor \n"
        + "see http://incubator.apache.org/openmeetings/LanguageEditor.html for Details \n"
        + "###############################################");
View Full Code Here

  }

  public Document createDocument(List<Users> uList) throws Exception {
    Document document = DocumentHelper.createDocument();
    document.setXMLEncoding("UTF-8");
    document.addComment("###############################################\n"
        + "This File is auto-generated by the Backup Tool \n"
        + "you should use the BackupPanel to modify or change this file \n"
        + "see http://incubator.apache.org/openmeetings/Upgrade.html for Details \n"
        + "###############################################");
View Full Code Here

                new Date(starttime.getTimeInMillis()),
                new Date(endtime.getTimeInMillis()));

        Document document = DocumentHelper.createDocument();
        document.setXMLEncoding("UTF-8");
        document.addComment("###############################################\n"
            + getServletContext().getServletContextName()
            + " Calendar \n"
            + "###############################################");

        Element vcalendar = document.addElement("vcalendar");
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.