Package org.dom4j

Examples of org.dom4j.Document.asXML()


            SearchRequestDsml searchRequestDsml = new SearchRequestDsml( searchRequest );
            searchRequestDsml.toDsml( rootElement );
            Dsmlv2Engine engine = new Dsmlv2Engine( browserConnection.getConnection().getHost(), browserConnection
                .getConnection().getPort(), browserConnection.getConnection().getBindPrincipal(), browserConnection
                .getConnection().getBindPassword() );
            String response = engine.processDSML( xmlRequest.asXML() );

            // Saving the response
            FileOutputStream fout = new FileOutputStream( exportDsmlFilename );
            new PrintStream( fout ).println( response );
            fout.close();
View Full Code Here


            Document stylizedDocument = styleDocument( document );
            stylizedDocument.addDocType( "beans", "-//SPRING//DTD BEAN//EN",
                "http://www.springframework.org/dtd/spring-beans.dtd" );

            return stylizedDocument.asXML();
        }
        catch ( Exception e )
        {
            ServerConfigurationWriterException exception = new ServerConfigurationWriterException( e.getMessage(), e
                .getCause() );
View Full Code Here

            createCustomEditorsBean( root );

            Document stylizedDocuement = styleDocument( document );
            stylizedDocuement.addDocType( "beans", "-//SPRING//DTD BEAN//EN",
                "http://www.springframework.org/dtd/spring-beans.dtd" );
            outFile.write( stylizedDocuement.asXML() );
            outFile.close();
        }
        catch ( Exception e )
        {
            ServerConfigurationWriterException exception = new ServerConfigurationWriterException( e.getMessage(), e
View Full Code Here

            Element rootElement = xmlRequest.addElement( "batchRequest" );
            SearchRequestDsml searchRequestDsml = new SearchRequestDsml( searchRequest );
            searchRequestDsml.toDsml( rootElement );
            Dsmlv2Engine engine = new Dsmlv2Engine( connection.getHost(), connection.getPort(), connection
                .getBindPrincipal(), connection.getBindPassword() );
            String response = engine.processDSML( xmlRequest.asXML() );

            // Saving the response
            FileOutputStream fout = new FileOutputStream( exportDsmlFilename );
            new PrintStream( fout ).println( response );
            fout.close();
View Full Code Here

            File file = new File(path);
           
            SAXReader xmlReader = new SAXReader();
            Document doc = xmlReader.read(file);
           
            System.out.println(doc.asXML());

            Node oiDbNode = doc.selectSingleNode("//oiDb");
            oldFolder.oiDb = oiDbNode.getText();
           
            Node oiGroupNode = doc.selectSingleNode("//oiGroup");
View Full Code Here

        catch ( TransformerException e )
        {
            // Will never occur
        }

        return stylizedDocument.asXML();
    }


    /**
     * Creates the DefaultDirectoryService bean.
View Full Code Here

    try {
      NormalizedMessage in = me.getMessage("in");
      DocumentResult result = new DocumentResult();
      TransformerFactory.newInstance().newTransformer().transform(in.getContent(), result);
      Document doc = result.getDocument();
      System.err.println(doc.asXML());
      String partner = me.getEndpoint().getEndpointName();
      String port = me.getInterfaceName().getLocalPart();
      String operation = me.getOperation().getLocalPart();
      AgilaEngineFactory.getEngine().acknowledge(partner, port, operation, doc);
    } catch (Exception e) {
View Full Code Here

    Document hibCfg = new SAXReader().read(hibernateConfigFile);
    Node node = hibCfg.selectSingleNode("//property[@name = 'connection.url'");
    String url = "jdbc:hsqldb:" + hsqldbDir.getCanonicalFile().toURI() + "agila";
    node.setText(url);
    FileWriter w = new FileWriter(hibernateConfigFile);
    w.write(hibCfg.asXML());
    w.close();
    // Create hsqldb schema
    new SchemaExport(new Configuration().configure()).create(false, true);
  }
View Full Code Here

            Element rootElement = xmlRequest.addElement( "batchRequest" );
            SearchRequestDsml searchRequestDsml = new SearchRequestDsml( searchRequest );
            searchRequestDsml.toDsml( rootElement );
            Dsmlv2Engine engine = new Dsmlv2Engine( connection.getHost(), connection.getPort(), connection
                .getBindPrincipal(), connection.getBindPassword() );
            String response = engine.processDSML( xmlRequest.asXML() );

            // Saving the response
            FileOutputStream fout = new FileOutputStream( exportDsmlFilename );
            new PrintStream( fout ).println( response );
            fout.close();
View Full Code Here

            createCustomEditorsBean( root );

            Document stylizedDocuement = styleDocument( document );
            stylizedDocuement.addDocType( "beans", "-//SPRING//DTD BEAN//EN",
                "http://www.springframework.org/dtd/spring-beans.dtd" );
            outFile.write( stylizedDocuement.asXML() );
            outFile.close();
        }
        catch ( Exception e )
        {
            ServerConfigurationWriterException exception = new ServerConfigurationWriterException( e.getMessage(), e
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.