Examples of XmlToJsonGenerator


Examples of org.jitterbit.integration.json.xml.XmlToJsonGenerator

    public void xmlToJson(ConversionParams params, XsdLocator xsdLocator) throws Exception {
        logger.info(String.format("Received request for XML-to-JSON conversion. Transformation ID: %d. XML file:\"%s\". JSON file: \"%s\"",
                        params.getTransformationId(), params.getXmlFile().getAbsolutePath(), params.getJsonFile().getAbsolutePath()));
        params.verifyXmlFileExists();
        XmlToJsonGenerator g = new XmlToJsonGenerator();
        File xsdFile = xsdLocator.getTargetXsd(params.getTransformationId());
        logger.fine("XSD file: " + xsdFile.getAbsolutePath());
        g.setOutputFile(params.getJsonFile());
        g.convertToJson(params.getXmlFile(), xsdFile);
        logger.info("The XML file was converted successfully.");
    }
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.