Examples of DocumentSource


Examples of org.dom4j.io.DocumentSource

    }

    @Override
    protected Source createResponsePayload(MethodParameter returnType, Object returnValue) {
        Element returnedElement = (Element) returnValue;
        return new DocumentSource(returnedElement);
    }
View Full Code Here

Examples of org.dom4j.io.DocumentSource

            transform(request, dom4jResult);
            requestElement = dom4jResult.getDocument().getRootElement();
        }
        Document responseDocument = DocumentHelper.createDocument();
        Element responseElement = invokeInternal(requestElement, responseDocument);
        return responseElement != null ? new DocumentSource(responseElement) : null;
    }
View Full Code Here

Examples of org.dom4j.io.DocumentSource

            // return original document
            return document;
        }

        // now lets style the given document
        DocumentSource source = new DocumentSource( document );
        DocumentResult result = new DocumentResult();
        try
        {
            transformer.transform( source, result );
        }
View Full Code Here

Examples of org.dom4j.io.DocumentSource

    // Create a transformer using the stylesheet
    final Transformer transformer = TransformerFactory.newInstance().newTransformer(xsl);

    // Source document is the XML generated from the BugCollection
    final Source source = new DocumentSource(document);

    // Write result to output stream
    final OutputStreamWriter writer = new OutputStreamWriter(new FileOutputStream(fileName), Charset.forName("UTF-8").newEncoder());
    final Result result = new StreamResult(writer);
    // Do the transformation
View Full Code Here

Examples of org.dom4j.io.DocumentSource

            // return original document
            return document;
        }

        // now lets style the given document
        DocumentSource source = new DocumentSource( document );
        DocumentResult result = new DocumentResult();
        try
        {
            transformer.transform( source, result );
        }
View Full Code Here

Examples of org.dom4j.io.DocumentSource

            // return original document
            return document;
        }

        // now lets style the given document
        DocumentSource source = new DocumentSource( document );
        DocumentResult result = new DocumentResult();
        try
        {
            transformer.transform( source, result );
        }
View Full Code Here

Examples of org.dom4j.io.DocumentSource

            // Create a transformer using the stylesheet
            TransformerFactory factory = TransformerFactory.newInstance();
            Transformer transformer = factory.newTransformer(xsl);

            // Source document is the XML generated from the BugCollection
            DocumentSource source = new DocumentSource(document);

            // Write result to output stream
            StreamResult result = new StreamResult(outputStream);

            // Do the transformation
View Full Code Here

Examples of org.dom4j.io.DocumentSource

    TransformerFactory factory = TransformerFactory.newInstance();
    Transformer transformer = factory.newTransformer(
        new StreamSource( this.getClass().getResourceAsStream( STYLESHEET_NAME ) ) );

    // apply the conversion stylesheet to the incoming process definition
    DocumentSource source = new DocumentSource( document );
    DocumentResult result = new DocumentResult();
    transformer.transform( source, result );

    // return the transformed document
    
View Full Code Here

Examples of org.dom4j.io.DocumentSource

                return new StreamSource(new StringReader((String) src));
            }
        }
        else if (src instanceof org.dom4j.Document)
        {
            return new DocumentSource((org.dom4j.Document) src);
        }
        else if (src instanceof org.xml.sax.InputSource)
        {
            return new SAXSource((InputSource) src);
        }
View Full Code Here

Examples of org.dom4j.io.DocumentSource

    protected Document[] internalProcess(Document doc) {
        if (logger.isDebugEnabled()) {
            logger.debug("About to transform: " + DomUtil.domToString(doc));
        }

        DocumentSource source = new DocumentSource(doc);
        DocumentResult result = new DocumentResult();
        try {
            synchronized(transformer) {
                transformer.transform(source, result);
            }
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.