Examples of DOMWriter


Examples of com.thoughtworks.xstream.io.xml.DomWriter

            documentBuilder = documentBuilderFactory.newDocumentBuilder();
        } catch (ParserConfigurationException e) {
            throw new ConversionException("Cannot instantiate " + Document.class.getName(), e);
        }
        Document document = documentBuilder.newDocument();
        DomWriter writer = new DomWriter(document);

        copy(reader, writer);

        if (Document.class.isAssignableFrom(unmarshallingContext.getRequiredType())) {
            return document;
View Full Code Here

Examples of com.thoughtworks.xstream.io.xml.DomWriter

            documentBuilder = documentBuilderFactory.newDocumentBuilder();
        } catch (ParserConfigurationException e) {
            throw (IOException)new IOException("Cannot instantiate " + Document.class.getName()).initCause(e);
        }
        Document document = documentBuilder.newDocument();
        DomWriter writer = new DomWriter(document);

        XStream xstream = XStreamUtil.createXStream();
        xstream.marshal(gbeanDatas, writer);

//        FileWriter w = new FileWriter("target/foo.xml");
View Full Code Here

Examples of com.thoughtworks.xstream.io.xml.DomWriter

            documentBuilder = documentBuilderFactory.newDocumentBuilder();
        } catch (ParserConfigurationException e) {
            throw (IOException)new IOException("Cannot instantiate " + Document.class.getName()).initCause(e);
        }
        Document document = documentBuilder.newDocument();
        DomWriter writer = new DomWriter(document);

        XStream xstream = XStreamUtil.createXStream();
        xstream.marshal(gbeanDatas, writer);

//        FileWriter w = new FileWriter("target/foo.xml");
View Full Code Here

Examples of com.thoughtworks.xstream.io.xml.DomWriter

    public Node transform(XObject source, TransformationContext context) {
        try {
            MetaObject mj = new MetaObjectImpl(source);
            Document root = DOMHelper.newDocument();
            DomWriter out = new DomWriter(DOMHelper.newDocument());
            XStream xs = new XStream();
            xs.alias("xobject", mj.getClass());
            xs.marshal(source, out);
            DOMHelper.adjustElementName(context, root.getDocumentElement());
            return root;
View Full Code Here

Examples of com.thoughtworks.xstream.io.xml.DomWriter

            documentBuilder = documentBuilderFactory.newDocumentBuilder();
        } catch (ParserConfigurationException e) {
            throw (IOException)new IOException("Cannot instantiate " + Document.class.getName()).initCause(e);
        }
        Document document = documentBuilder.newDocument();
        DomWriter writer = new DomWriter(document);

        XStream xstream = XStreamUtil.createXStream();
        xstream.marshal(gbeanDatas, writer);

//        FileWriter w = new FileWriter("target/foo.xml");
View Full Code Here

Examples of com.thoughtworks.xstream.io.xml.DomWriter

            documentBuilder = documentBuilderFactory.newDocumentBuilder();
        } catch (ParserConfigurationException e) {
            throw (IOException)new IOException("Cannot instantiate " + Document.class.getName()).initCause(e);
        }
        Document document = documentBuilder.newDocument();
        DomWriter writer = new DomWriter(document);

        XStream xstream = XStreamUtil.createXStream();
        xstream.marshal(gbeanDatas, writer);

//        FileWriter w = new FileWriter("target/foo.xml");
View Full Code Here

Examples of com.thoughtworks.xstream.io.xml.DomWriter

    public void marshal(MessageExchange exchange, NormalizedMessage message, Object body) throws MessagingException {
        if (useDOM) {
            try {
                Document document = transformer.createDocument();
                getXStream().marshal(body, new DomWriter(document));
                message.setContent(new DOMSource(document));
            }
            catch (ParserConfigurationException e) {
                throw new MessagingException("Failed to marshal: " + body + " to DOM document: " + e, e);
            }
View Full Code Here

Examples of com.thoughtworks.xstream.io.xml.DomWriter

    public Node transform(XObject source, TransformationContext context) {
        try {
            MetaObject mj = new MetaObjectImpl(source);
            Document root = DOMHelper.newDocument();
            DomWriter out = new DomWriter(DOMHelper.newDocument());
            XStream xs = new XStream();
            xs.alias("xobject", mj.getClass());
            xs.marshal(source, out);
            DOMHelper.adjustElementName(context, root.getDocumentElement());
            return root;
View Full Code Here

Examples of com.thoughtworks.xstream.io.xml.DomWriter

    public void marshal(MessageExchange exchange, NormalizedMessage message, Object body) throws MessagingException {
        if (useDOM) {
            try {
                Document document = transformer.createDocument();
                getXStream().marshal(body, new DomWriter(document));
                message.setContent(new DOMSource(document));
            }
            catch (ParserConfigurationException e) {
                throw new MessagingException("Failed to marshal: " + body + " to DOM document: " + e, e);
            }
View Full Code Here

Examples of net.sf.saxon.dom.DOMWriter

     * content of the result tree will be appended.
     * @param root the root node for the new tree.
     */

    public DOMDestination(org.w3c.dom.Document root) {
        domWriter = new DOMWriter();
        domWriter.setNode(root);
    }
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.