Package com.thoughtworks.xstream

Examples of com.thoughtworks.xstream.XStream.marshal()


        }
        Document document = documentBuilder.newDocument();
        DomWriter writer = new DomWriter(document);

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

//        FileWriter w = new FileWriter("target/foo.xml");
//        xstream.toXML(gbeanDatas, w);
//        w.close();
View Full Code Here


                ? Boolean.TRUE
                : Boolean.FALSE);
        XStream xstream = new XStream((HierarchicalStreamDriver)null);
        buffer = new StringWriter();
        XMLStreamWriter xmlStreamWriter = outputFactory.createXMLStreamWriter(buffer);
        xstream.marshal(testInput, new StaxWriter(qnameMap, xmlStreamWriter, true, repairNamespaceMode));
    }

}
View Full Code Here

        }

        try {
            this.startDocument(true);
            for (Iterator i = source.iterator(); i.hasNext();) {
                xstream.marshal(i.next(), this);
            }
            this.endDocument(true);
        } catch (StreamException e) {
            if (e.getCause() instanceof SAXException) {
                throw (SAXException) (e.getCause());
View Full Code Here

        }

        try {
            this.startDocument(true);
            for (Iterator i = source.iterator(); i.hasNext();) {
                xstream.marshal(i.next(), this);
            }
            this.endDocument(true);
        } catch (StreamException e) {
            if (e.getCause() instanceof SAXException) {
                throw (SAXException) (e.getCause());
View Full Code Here

        }
        Document document = documentBuilder.newDocument();
        DomWriter writer = new DomWriter(document);

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

//        FileWriter w = new FileWriter("target/foo.xml");
//        xstream.toXML(gbeanDatas, w);
//        w.close();
View Full Code Here

        }
        Document document = documentBuilder.newDocument();
        DomWriter writer = new DomWriter(document);

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

//        FileWriter w = new FileWriter("target/foo.xml");
//        xstream.toXML(gbeanDatas, w);
//        w.close();
View Full Code Here

        }

        XStream xstream = getXStream();
        xstream.setMode(XStream.NO_REFERENCES);
        xstream.aliasPackage("", "org.apache.activemq.command");
        xstream.marshal(ds, out);
        return buffer.toString();
    }

    // Properties
    // -------------------------------------------------------------------------
View Full Code Here

        }
        Document document = documentBuilder.newDocument();
        DomWriter writer = new DomWriter(document);

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

//        FileWriter w = new FileWriter("target/foo.xml");
//        xstream.toXML(gbeanDatas, w);
//        w.close();
View Full Code Here

        }

        XStream xstream = getXStream();
        xstream.setMode(XStream.NO_REFERENCES);
        xstream.aliasPackage("", "org.apache.activemq.command");
        xstream.marshal(ds, out);
        return buffer.toString();
    }

    // Properties
    // -------------------------------------------------------------------------
View Full Code Here

            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;
        } catch (Exception e) {
            throw new TransformationException(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.