Package org.dom4j

Examples of org.dom4j.DocumentFactory.createDocument()


   {
      processDir(jbossHome);
      try
      {
         DocumentFactory df = DocumentFactory.getInstance();
         Document doc = df.createDocument();
         Element root = doc.addElement("jar-versions");
         Iterator iter = jars.iterator();
         while( iter.hasNext() )
         {
            JarInfo info = (JarInfo) iter.next();
View Full Code Here


   * @return Document The XML document
   */
  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");

View Full Code Here

   * @see org.olat.core.gui.control.generic.textmarker.TextMarkerManager#saveToFile(org.olat.core.util.vfs.VFSLeaf,
   *      java.util.List)
   */
  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
View Full Code Here

    public Document toDocument() {
        // if (project == null) throw new NullPointerException("No project");
        assert project != null;

        DocumentFactory docFactory = new DocumentFactory();
        Document document = docFactory.createDocument();
        Dom4JXMLOutput treeBuilder = new Dom4JXMLOutput(document);

        try {
            writeXML(treeBuilder);
        } catch (IOException e) {
View Full Code Here

   {
      processDir(jbossHome);
      try
      {
         DocumentFactory df = DocumentFactory.getInstance();
         Document doc = df.createDocument();
         Element root = doc.addElement("jar-versions");
         Iterator iter = jars.iterator();
         while( iter.hasNext() )
         {
            JarInfo info = (JarInfo) iter.next();
View Full Code Here

        writeEventListeners(workflowProcess.getEventListeners(), workflowProcessElement);

        writeExtendedAttributes(workflowProcess.getExtendedAttributes(),
                workflowProcessElement);

        Document document = df.createDocument(workflowProcessElement);
        document.addDocType(FPDL_NS_PREFIX + ":" + WORKFLOW_PROCESS, PUBLIC_ID, SYSTEM_ID);
        return document;

    }
View Full Code Here

    {
        //holds temporary Elements to which child Elements can be added
        HashMap map = new HashMap();
       
        DocumentFactory df = DocumentFactory.getInstance();
        Document doc = df.createDocument();
        int count = 1;
        for(int i=0; i < list.size(); i++)
        {
            MenuVO menu = (MenuVO) list.get(i);
           
View Full Code Here

    }
   
    private Document createQuickMenu(String dsName, String dbType, String userId, ArrayList list) throws DAOException
    {
        DocumentFactory df = DocumentFactory.getInstance();
        Document doc = df.createDocument();

        int count = 1;
        //create the root element
        Element elem1 = doc.addElement(TAG_ROOT);
        elem1 = elem1.addAttribute(ATTR_ID, ATTR_VAL_ID + count++);
View Full Code Here

        String endpointNS = doc.valueOf("wsdl-dtc:specification/wsdl-dtc:endpoint/wsdl-dtc:namespace/text()");

        /*
         * Root
         */
        Document wsdlDoc = factory.createDocument();
        Element wsdlRoot = wsdlDoc.addElement("wsdl:definitions", WSDL_NS_URI);
        wsdlRoot.addNamespace("tns", endpointNS);
        wsdlRoot.addNamespace("wsoap12", WSOAP12_NS_URI);
        wsdlRoot.addNamespace("wsdl", WSDL_NS_URI);
        wsdlRoot.addNamespace("xsd", XSD_NS_URI);
View Full Code Here

    }

    @Test
    public void testConvert() throws Exception {
        DocumentFactory df = DocumentFactory.getInstance();
        Document doc = df.createDocument("UTF-8");
        doc.setRootElement(df.createElement("rootElement"));

        SimpleSerializedObject<Document> original = new SimpleSerializedObject<Document>(doc,
                                                                                         Document.class,
                                                                                         serializedType);
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.