Package javax.xml.transform.dom

Examples of javax.xml.transform.dom.DOMResult


        return new DOMSource(toDOMNodeFromStAX(source));
    }

    @Converter
    public Node toDOMNodeFromSAX(SAXSource source) throws ParserConfigurationException, IOException, SAXException, TransformerException {
        DOMResult result = new DOMResult();
        toResult(source, result);
        return result.getNode();
    }
View Full Code Here


        return result.getNode();
    }

    @Converter
    public Node toDOMNodeFromStAX(StAXSource source) throws ParserConfigurationException, IOException, SAXException, TransformerException {
        DOMResult result = new DOMResult();
        toResult(source, result);
        return result.getNode();
    }
View Full Code Here

    public Node evaluateAsDOM(Exchange exchange) throws Exception {
        LOG.debug("evaluateAsDOM: {} for exchange: {}", expression, exchange);
        initialize(exchange);

        DOMResult result = new DOMResult();
        DynamicQueryContext context = createDynamicContext(exchange);
        XQueryExpression expression = getExpression();
        expression.pull(context, result, properties);
        return result.getNode();
    }
View Full Code Here

    }

    public static Node  fromSource(Source src) throws Exception {

        Transformer trans = TransformerFactory.newInstance().newTransformer();
        DOMResult res = new DOMResult();
        trans.transform(src, res);
        return res.getNode();
    }
View Full Code Here

                builtIns.put("http://www.w3.org/2005/05/xmlmime", "classpath:/schemas/wsdl/ws-addr.xsd");
            }

            @Override
            public Result createOutput(String ns, String file) throws IOException {
                DOMResult result = new DOMResult();

                if (builtIns.containsKey(ns)) {
                    result.setSystemId(builtIns.get(ns));
                    return result;
                }
                result.setSystemId(file);
                results.add(result);
                return result;
            }
        });
View Full Code Here

        return new DOMSource(toDOMNodeFromSAX(source));
    }

    @Converter
    public Node toDOMNodeFromSAX(SAXSource source) throws ParserConfigurationException, IOException, SAXException, TransformerException {
        DOMResult result = new DOMResult();
        toResult(source, result);
        return result.getNode();
    }
View Full Code Here

                        node = ((DOMSource)source).getNode();
                        doTransform = false;
                    }
                   
                    if (doTransform) {
                        DOMResult domResult = new DOMResult();
                        domResult.setSystemId(source.getSystemId());
                       
                        getTransformer().transform(source, domResult);
   
                        node = domResult.getNode();
                    }
                   
                    if (null != node) {
                        if (node instanceof Document) {
                            try {
View Full Code Here

        // create a new errorHandler and set it on the validator
        errorHandler.reset();
        validator.setErrorHandler(errorHandler);

        DOMResult result = new DOMResult();
        validator.validate(source, result);

        errorHandler.handleErrors(exchange, schema, result);
        /*
         * Fault fault = exchange.createFault(); if (errorHandler.hasErrors()) { //
View Full Code Here

        byte[] bytes = evaluateAsBytes(exchange);
        return new BytesSource(bytes);
    }

    public Node evaluateAsDOM(E exchange) throws Exception {
        DOMResult result = new DOMResult();
        getExpression().pull(createDynamicContext(exchange), result, properties);
        return result.getNode();
    }
View Full Code Here

                        node = ((DOMSource)node).getNode();
                        doTransform = false;
                    }
                   
                    if (doTransform) {
                        DOMResult domResult = new DOMResult();
                        domResult.setSystemId(source.getSystemId());
                       
                        getTransformer().transform(source, domResult);
   
                        node = domResult.getNode();
                    }
                   
                    if (null != node) {
                        if (node instanceof Document) {
                            ((Document)node).setDocumentURI(source.getSystemId());
View Full Code Here

TOP

Related Classes of javax.xml.transform.dom.DOMResult

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.