Package org.exolab.castor.xml.schema.util

Examples of org.exolab.castor.xml.schema.util.XMLInstance2Schema


     * @param outputFilePath Name of the output file to create.
     */
    private void processFile(final String filePath, final String outputFilePath) {
        log("Processing " + filePath);
        try {
            XMLInstance2Schema schemaGenerator = new XMLInstance2Schema();
            if (_defaultGroupingAsAll) {
                schemaGenerator.setDefaultGroupingAsAll();
            }
            Schema schema = schemaGenerator.createSchema(filePath);
            String outputFileName = outputFilePath;
            if (outputFileName == null) {
                outputFileName = deriveOutputFilePath(filePath);
            }
           FileWriter dstWriter = new FileWriter(outputFileName);
            schemaGenerator.serializeSchema(dstWriter, schema);
        } catch (IOException e) {
            throw new BuildException ("Problem writing to the given putput sink "
                    + _xmlInstanceFile.getAbsolutePath(), e);
        } catch (SAXException e) {
            throw new BuildException ("Problem streaming the generated XML schema instance "
View Full Code Here

TOP

Related Classes of org.exolab.castor.xml.schema.util.XMLInstance2Schema

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.