Package org.apache.xml.serialize

Examples of org.apache.xml.serialize.XMLSerializer.serialize()


           
            // Write to workspace.xml
            File file = new File(rootDirectory + "/" + workspaceFile);
            FileOutputStream os = new FileOutputStream(file);
            XMLSerializer serializer = new XMLSerializer(os, format);
            serializer.serialize(document);
            os.close();
           
            // Cache workspace
            cache.workspace = workspace;
            cache.workspaceLastModified = file.lastModified();
View Full Code Here


    of.setPreserveSpace(true);
    of.setEncoding(doc.getXmlEncoding());

    StringWriter sw = new StringWriter();
    XMLSerializer serializer = new XMLSerializer(sw, of);
    serializer.serialize(doc);
    return sw.toString();
  }
}
View Full Code Here

            outputFormat.setEncoding(theEncoding);
        }
        outputFormat.setIndenting(isIndent);
        outputFormat.setPreserveSpace(false);
        XMLSerializer serializer = new XMLSerializer(theOutput, outputFormat);
        serializer.serialize(theWebXml.getDocument());
    }

}
View Full Code Here

       
        OutputFormat format = new OutputFormat(doc);
        ByteArrayOutputStream oStream = new ByteArrayOutputStream();
        XMLSerializer serializer = new XMLSerializer(oStream, format);
        try {
            serializer.serialize(schemaEl);
        } catch (IOException e) {
            // TODO this conforms to parent, but needs an error message via ErrorReporter and maybe it should be handled differently?
            throw new RuntimeException(e);
        }
        ByteArrayInputStream iStream = new ByteArrayInputStream(oStream.toByteArray());
View Full Code Here

        OutputFormat format = new OutputFormat();
        format.setIndenting(true);
        format.setIndent(2);
        XMLSerializer serializer = new XMLSerializer(System.out, format);
        System.out.println("-->Runtime SCDL model for composite " + composite.getName());
        serializer.serialize(document);
    }

    private static void writeWSDL(Component component, Contract contract, Definition definition) {
        if (definition == null) {
            System.out.println("-->No generated WSDL for " + (component != null ? component.getName() : "") + "/" + contract.getName());
View Full Code Here

        OutputFormat format = new OutputFormat();
        format.setIndenting(true);
        format.setIndent(2);
        XMLSerializer serializer = new XMLSerializer(System.out, format);
        System.out.println("-->Runtime SCDL model for composite " + composite.getName());
        serializer.serialize(document);
    }

    private static void writeWSDL(Component component, Contract contract, Definition definition) {
        if (definition == null) {
            System.out.println("-->No generated WSDL for " + (component != null ? component.getName() : "") + "/" + contract.getName());
View Full Code Here

           
            // Write to domain.composite
            File file = new File(rootDirectory + "/" + compositeFile);
            FileOutputStream os = new FileOutputStream(file);
            XMLSerializer serializer = new XMLSerializer(os, format);
            serializer.serialize(document);

            // Cache composite collection
            cache.compositeCollection = compositeCollection;
            cache.compositeCollectionLastModified = file.lastModified();
           
View Full Code Here

        Document document = documentBuilder.parse(new ByteArrayInputStream(bos.toByteArray()));
        OutputFormat format = new OutputFormat();
        format.setIndenting(true);
        format.setIndent(2);
        XMLSerializer serializer = new XMLSerializer(System.out, format);
        serializer.serialize(document);
    }
}
View Full Code Here

        Document document = documentBuilder.parse(new ByteArrayInputStream(bos.toByteArray()));
        OutputFormat format = new OutputFormat();
        format.setIndenting(true);
        format.setIndent(2);
        XMLSerializer serializer = new XMLSerializer(System.out, format);
        serializer.serialize(document);
    }

}
View Full Code Here

           
            // Write to workspace.xml
            File file = new File(rootDirectory + "/" + workspaceFile);
            FileOutputStream os = new FileOutputStream(file);
            XMLSerializer serializer = new XMLSerializer(os, format);
            serializer.serialize(document);
            os.close();
           
            // Cache workspace
            cache.workspace = workspace;
            cache.workspaceLastModified = file.lastModified();
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.