Examples of IMarshallingContext


Examples of org.jibx.runtime.IMarshallingContext

            throws JiBXException, IOException, JDOMException {

        // marshal XML
        final IBindingFactory bfact =
            BindingDirectory.getFactory(object.getClass());
        final IMarshallingContext mctx = bfact.createMarshallingContext();
        mctx.setIndent(4);
        final ByteArrayOutputStream baos = new ByteArrayOutputStream();
        mctx.marshalDocument(object, "UTF-8", null, baos);
        baos.close();
        final String xmlContent = baos.toString();

        // validate XML
        SAX_BUILDER.build(new StringReader(xmlContent));
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.