Examples of SchemaHolder


Examples of org.jibx.schema.SchemaHolder

     * @throws IOException
     */
    public static void writeSchemas(File dir, Collection schemas) throws JiBXException, IOException {
        IBindingFactory fact = BindingDirectory.getFactory(SchemaUtils.XS_PREFIX_BINDING, SchemaElement.class);
        for (Iterator iter = schemas.iterator(); iter.hasNext();) {
            SchemaHolder holder = (SchemaHolder)iter.next();
            if (!holder.isExistingFile()) {
                IMarshallingContext ictx = fact.createMarshallingContext();
                File file = new File(dir, holder.getFileName());
                ictx.setOutput(new FileOutputStream(file), null);
                ictx.setIndent(2);
                ((IMarshallable)holder.getSchema()).marshal(ictx);
                ictx.getXmlWriter().flush();
            }
        }
    }
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.