So I am trying to get an flat file XML version of an OPC document.
I am using OPCPackage from org.apache.poi.openxml4j
In C++ you there is a call that creates flat XML file from this zipped file.
Anyone knows how to do that in Java?
Also any good read related to OPC and Java would be awesome.
Thanks a lot
Cheers
UPDATE: related to the comment i made to only answer...
code
// imports
import org.docx4j.convert.out.flatOpcXml.FlatOpcXmlCreator;
import org.docx4j.openpackaging.packages.WordprocessingMLPackage;
// code snippet
WordprocessingMLPackage wmlPkg = null;
try
{
wmlPkg = WordprocessingMLPackage.load(inFile);
}
catch (Docx4JException ex)
{
//...
}
FlatOpcXmlCreator flatOpcWorker = new FlatOpcXmlCreator((wmlPkg));
flatOpcWorker.marshal(new FileOutputStream(tmpFlatFile.getAbsolutePath()));
So thats code snippet and it results in compile error:
cannot find symbol symbol: method marshal(java.io.FileOutputStream) location: variable flatOpcWorker of type org.docx4j.convert.out.flatOpcXml.FlatOpcXmlCreator