Package org.openoffice.xmerge.converter.xml.xslt

Examples of org.openoffice.xmerge.converter.xml.xslt.GenericOfficeDocument


   
     public Document createOfficeDocument(String name, InputStream is,boolean isZip)
        throws IOException {

        // read zipped XML stream
        GenericOfficeDocument doc = new GenericOfficeDocument(name);
        doc.read(is,isZip);
        return doc;
    }
View Full Code Here


    public Document deserialize() throws ConvertException, IOException {
  log("\nFound the XSLT deserializer");
  Enumeration enumerate = cd.getDocumentEnumeration();
  org.w3c.dom.Document domDoc=null;
  DOMDocument docOut=null;
  GenericOfficeDocument doc = null;
  ByteArrayOutputStream baos =null;
  GenericOfficeDocument sxwDoc = new GenericOfficeDocument("output");
  while (enumerate.hasMoreElements()) {      
     docOut = (DOMDocument) enumerate.nextElement();
  }
  domDoc = docOut.getContentDOM()
  try{
       baos = transform(domDoc);
       sxwDoc.initContentDOM();
       DocumentBuilderFactory dFactory = DocumentBuilderFactory.newInstance();
       dFactory.setNamespaceAware(true);
       DocumentBuilder dBuilder = dFactory.newDocumentBuilder();
       sxwDoc.setContentDOM(dBuilder.parse(new ByteArrayInputStream(baos.toByteArray())));
 
  }
  catch(Exception e){
      System.out.println("The following error occurred:"+e);
  }
View Full Code Here

TOP

Related Classes of org.openoffice.xmerge.converter.xml.xslt.GenericOfficeDocument

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.