Package org.dom4j.io

Examples of org.dom4j.io.DocumentResult


        transformer = factory
            .newTransformer( new StreamSource( Activator.class.getResourceAsStream( "template.xslt" ) ) );

        // now lets style the given document
        DocumentSource source = new DocumentSource( document );
        DocumentResult result = new DocumentResult();

        transformer.transform( source, result );

        // return the transformed document
        Document transformedDoc = result.getDocument();
        return transformedDoc;
    }
View Full Code Here


        transformer = factory
            .newTransformer( new StreamSource( Activator.class.getResourceAsStream( "template.xslt" ) ) );

        // now lets style the given document
        DocumentSource source = new DocumentSource( document );
        DocumentResult result = new DocumentResult();

        transformer.transform( source, result );

        // return the transformed document
        Document transformedDoc = result.getDocument();
        return transformedDoc;
    }
View Full Code Here

        transformer = factory
            .newTransformer( new StreamSource( ApacheDSConfigurationPlugin.class.getResourceAsStream( "template.xslt" ) ) );

        // now lets style the given document
        DocumentSource source = new DocumentSource( document );
        DocumentResult result = new DocumentResult();

        transformer.transform( source, result );

        // return the transformed document
        Document transformedDoc = result.getDocument();
        return transformedDoc;
    }
View Full Code Here

   * @see org.mule.jbi.components.AbstractComponent#process(javax.jbi.messaging.MessageExchange)
   */
  protected void process(MessageExchange me) {
    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);
View Full Code Here

      NormalizedMessage in = me.createMessage();
      in.setContent(new DocumentSource(message));
      me.setMessage(in, "in");
      channel.sendSync(me);
      NormalizedMessage out = me.getMessage("out");
      DocumentResult result = new DocumentResult();
      TransformerFactory.newInstance().newTransformer().transform(out.getContent(), result);
      return result.getDocument();
    } catch (Exception e) {
      throw new EngineRuntimeException(e);
    }
  }
View Full Code Here

      NormalizedMessage in = me.createMessage();
      in.setContent(new DocumentSource(message));
      me.setMessage(in, "in");
      channel.sendSync(me);
      NormalizedMessage out = me.getMessage("out");
      DocumentResult result = new DocumentResult();
      TransformerFactory.newInstance().newTransformer().transform(out.getContent(), result);
      return result.getDocument();
    } catch (Exception e) {
      throw new EngineRuntimeException(e);
    }
  }
View Full Code Here

        transformer = factory
            .newTransformer( new StreamSource( Activator.class.getResourceAsStream( "template.xslt" ) ) );

        // now lets style the given document
        DocumentSource source = new DocumentSource( document );
        DocumentResult result = new DocumentResult();

        transformer.transform( source, result );

        // return the transformed document
        Document transformedDoc = result.getDocument();
        return transformedDoc;
    }
View Full Code Here

            // Will never occur
        }

        // now lets style the given document
        DocumentSource source = new DocumentSource( document );
        DocumentResult result = new DocumentResult();
        try
        {
            transformer.transform( source, result );
        }
        catch ( TransformerException e )
        {
            // Will never occur
        }

        // return the transformed document
        Document transformedDoc = result.getDocument();
        return transformedDoc;
    }
View Full Code Here

            e1.printStackTrace();
        }

        // now lets style the given document
        DocumentSource source = new DocumentSource( document );
        DocumentResult result = new DocumentResult();
        try
        {
            transformer.transform( source, result );
        }
        catch ( TransformerException e )
        {
            // TODO Auto-generated catch block
            e.printStackTrace();
        }

        // return the transformed document
        Document transformedDoc = result.getDocument();
        return transformedDoc;
    }
View Full Code Here

            // Will never occur
        }

        // now lets style the given document
        DocumentSource source = new DocumentSource( document );
        DocumentResult result = new DocumentResult();
        try
        {
            transformer.transform( source, result );
        }
        catch ( TransformerException e )
        {
            // Will never occur
        }

        // return the transformed document
        Document transformedDoc = result.getDocument();
        return transformedDoc;
    }
View Full Code Here

TOP

Related Classes of org.dom4j.io.DocumentResult

Copyright © 2018 www.massapicom. 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.