Package org.dom4j

Examples of org.dom4j.DocumentFactory.createElement()


   */
  public Document getResDoc(AssessmentInstance ai, Locale locale, Identity identity) {
    AssessmentContext ac = ai.getAssessmentContext();
    DocumentFactory df = DocumentFactory.getInstance();
    Document res_doc = df.createDocument();
    Element root = df.createElement("qti_result_report");
    res_doc.setRootElement(root);
    Element result = root.addElement("result");
    Element extension_result = result.addElement("extension_result");

    // add items (not qti standard, but nice to display original questions ->
View Full Code Here


  private static void addStaticsPath(Element el_in, AssessmentInstance ai) {
    Element el_staticspath = (Element) el_in.selectSingleNode(STATICS_PATH);
    if (el_staticspath == null) {
      DocumentFactory df = DocumentFactory.getInstance();
      el_staticspath = df.createElement(STATICS_PATH);
      Resolver resolver = ai.getResolver();
      el_staticspath.addAttribute("ident", resolver.getStaticsBaseURI());
      el_in.add(el_staticspath);
    }
  }
View Full Code Here

   */
  public void saveToFile(VFSLeaf textMarkerFile, List textMarkerList) {
    DocumentFactory df = DocumentFactory.getInstance();
    Document doc = df.createDocument();
    // create root element with version information
    Element root = df.createElement(XML_ROOT_ELEMENT);
    root.addAttribute(XML_VERSION_ATTRIBUTE, String.valueOf(VERSION));
    doc.setRootElement(root);
    // add TextMarker elements
    Iterator iter = textMarkerList.iterator();
    while (iter.hasNext()) {
View Full Code Here

    public Document workflowProcessToDom(WorkflowProcess workflowProcess)
            throws FPDLSerializerException {
        DocumentFactory df = new DocumentFactory();

        // serialize the Package
        Element workflowProcessElement = df.createElement(new QName(
                WORKFLOW_PROCESS, FPDL_NS));
        workflowProcessElement.addNamespace(FPDL_NS_PREFIX, FPDL_URI);
//      workflowProcessElement.addNamespace(XSD_NS_PREFIX, XSD_URI);
//      workflowProcessElement.addNamespace(XSI_NS_PREFIX, XSI_URI);
        workflowProcessElement.addAttribute(ID, workflowProcess.getId());
View Full Code Here

              continue;
            }

            if (menu.getLeaf().equalsIgnoreCase(VALUE_YES))
            {
                Element elem = df.createElement(menu.getTagName());
                elem = elem.addAttribute(ATTR_ID, ATTR_VAL_ID + count);
                elem = elem.addAttribute(ATTR_NAME, menu.getQuickMenuName());
                elem = elem.addAttribute(ATTR_HREF, menu.getHyperlink());
                if(menu.getLeaf().equalsIgnoreCase(VALUE_YES))
                {
View Full Code Here

     * @return the created contentdb-element
     */
    public static Element addContentDB(Element parent, String implClass) {
        DocumentFactory factory = DocumentFactory.getInstance();
       
        Element database = factory.createElement("contentdb");
        database.addAttribute("enabled", "true");
        database.addAttribute("lazyconnect", "false");
       
        Element elem = factory.createElement("type");
        database.add(elem);
View Full Code Here

       
        Element database = factory.createElement("contentdb");
        database.addAttribute("enabled", "true");
        database.addAttribute("lazyconnect", "false");
       
        Element elem = factory.createElement("type");
        database.add(elem);
        elem.add(factory.createText(implClass));

        elem = factory.createElement("dbkey");
        database.add(elem);
View Full Code Here

       
        Element elem = factory.createElement("type");
        database.add(elem);
        elem.add(factory.createText(implClass));

        elem = factory.createElement("dbkey");
        database.add(elem);
        elem.add(factory.createText("(Enter database key here)"));
       
        elem = factory.createElement("dbpath");
        database.add(elem);
View Full Code Here

        elem = factory.createElement("dbkey");
        database.add(elem);
        elem.add(factory.createText("(Enter database key here)"));
       
        elem = factory.createElement("dbpath");
        database.add(elem);
        elem.add(factory.createText("(Enter database path here)"));
       
        elem = factory.createElement("title");
        database.add(elem);
View Full Code Here

       
        elem = factory.createElement("dbpath");
        database.add(elem);
        elem.add(factory.createText("(Enter database path here)"));
       
        elem = factory.createElement("title");
        database.add(elem);

        elem = factory.createElement("domain");
        database.add(elem);
        elem.add(factory.createText("default"));
View Full Code Here

TOP
Copyright © 2015 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.