Package org.dom4j

Examples of org.dom4j.Document.addElement()


        "This File is auto-generated by the Backup Tool \n" +
        "you should use the BackupPanel to modify or change this file \n" +
        "see http://code.google.com/p/openmeetings/wiki/BackupPanel for Details \n" +
        "###############################################");
   
    Element root = document.addElement("root");
   
    Element users = root.addElement("users");

    for (Iterator<Users> it = uList.iterator();it.hasNext();) {
      Users u = it.next();
View Full Code Here


        "This File is auto-generated by the LanguageEditor \n" +
        "to add new Languages or modify/customize it use the LanguageEditor \n" +
        "see http://code.google.com/p/openmeetings/wiki/LanguageEditor for Details \n" +
        "###############################################");
   
    Element root = document.addElement("language");

    for (Iterator<Fieldvalues> it = fvList.iterator();it.hasNext();) {
      Fieldvalues fv = it.next();
      Element eTemp = root.addElement("string")
          .addAttribute("id", fv.getFieldvalues_id().toString())
View Full Code Here

    HashMap<String,Object> returnMap = new HashMap<String,Object>();
    returnMap.put("process", "generateXMLDocument");   
    try {
     
          Document document = DocumentHelper.createDocument();
          Element root = document.addElement( "presentation" );

          File file = new File(targetDirectory+originalDocument);
          root.addElement( "originalDocument" )
        .addAttribute("lastmod", (new Long(file.lastModified())).toString())
        .addAttribute("size", (new Long(file.length())).toString())         
View Full Code Here

 
  public void createDocument(String filePath, Integer stepNo) throws Exception {
   
    Document document = DocumentHelper.createDocument();
   
    Element root = document.addElement( "install" );
    Element step = root.addElement("step");
   
    step.addElement("stepnumber").addText(stepNo.toString());
    step.addElement("stepname").addText("Step "+stepNo);
   
View Full Code Here

      if (!parentDirectory.isDirectory() || !parentDirectory.exists()) {
        parentDirectory.mkdirs();
      }

      Document document = DocumentHelper.createDocument();
      Element root = document.addElement(ROOT_NODE.replaceAll("/", ""));
      XmlUtility.processXPath(root, EXTENDED_STATE_XPATH, Integer.toString(extendedState));
      XmlUtility.processXPath(root, SELECTED_PLUGIN_XPATH, selectedPlugin);

      if (size != null) {
        XmlUtility.processXPath(root, SIZE_WIDTH_XPATH, Integer.toString((int) size.getWidth()));
View Full Code Here

   * @param configuration
   * @throws IOException
   */
  public static void saveXmlConfigurationFile(File configurationFile, ConfigurationService configuration) throws IOException {
    Document document = DocumentHelper.createDocument();
    Element root = document.addElement(ROOT_NODE.replaceAll("/", ""));
    root.addAttribute("config-version", "2");
    XmlUtility.processXPath(root, LAF_XPATH, Integer.toString(configuration.getLookAndFeel()));
    XmlUtility.processXPath(root, THEME_XPATH, Integer.toString(configuration.getTheme()));
    XmlUtility.processXPath(root, POOL_SIZE_XPATH, Integer.toString(configuration.getThumbCreatorPoolSize()));
    XmlUtility.processXPath(root, LOGGING_LEVEL_XPATH, Integer.toString(configuration.getLoggingLevel()));
View Full Code Here

  public void saveEnvironment(File outFile, boolean savePasswords){
    try {
      if (outFile != null){
        synchronized(Environment.class){
          Document document = DocumentHelper.createDocument();
          Element root = document.addElement("pdfsam_saved_jobs");
          root.addAttribute("version", GuiClient.getVersion());
          root.addAttribute("savedate", new SimpleDateFormat("dd-MMM-yyyy").format(new Date()));
          String selection = treePanel.getSelectedPlugin();
          if(selection != null && selection.length()>0){
            root.addAttribute("selection", selection);
View Full Code Here

     * @see org.apache.directory.studio.apacheds.configuration.model.ServerXmlIO#toXml(org.apache.directory.studio.apacheds.configuration.model.ServerConfiguration)
     */
    public String toXml( ServerConfiguration serverConfiguration ) throws IOException
    {
        Document document = DocumentHelper.createDocument();
        Element root = document.addElement( "beans" ); //$NON-NLS-1$

        // Environment Bean
        createEnvironmentBean( root, ( ServerConfigurationV150 ) serverConfiguration );

        // Configuration Bean
View Full Code Here

    {
        // Creating the document
        Document document = DocumentHelper.createDocument();

        // Creating the root element with its namespaces definitions
        Element root = document.addElement( new QName( ServerXmlIOV152.ELEMENT_BEANS, NAMESPACE_XBEAN_SPRING ) );
        root.add( NAMESPACE_SPRINGFRAMEWORK );
        root.add( NAMESPACE_APACHEDS );

        // DefaultDirectoryService Bean
        createDefaultDirectoryServiceBean( root, ( ServerConfigurationV152 ) serverConfiguration );
View Full Code Here

    }

    @Override
    protected Element getReturnValue(MethodParameter returnType) {
        Document document = DocumentHelper.createDocument();
        return document.addElement(LOCAL_NAME, NAMESPACE_URI);
    }

    @ResponsePayload
    public Element element(@RequestPayload Element element) {
        return 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.