Hi, I need to modify the /ppt/presentation.xml part but when I do that using
the part.getOutputStream method nothing happens. Here is my code:

        public static void main(final String[] args) throws Exception {
                final XMLSlideShow ppt = new XMLSlideShow();

                final PackagePart part = ppt.getPackage().getPart(
                                
PackagingURIHelper.createPartName("/ppt/presentation.xml"));

                final String content = "<HelloWorld />";

                final OutputStream os = part.getOutputStream();
                final PrintStream printStream = new PrintStream(os);
                printStream.print(content);
                printStream.close();

                // print slide show to pptx file
                final FileOutputStream out = new 
FileOutputStream("C:/simon/test.pptx");

                ppt.write(out);
                out.close();
        }

What I want the code to do is replace the content with the element
<HelloWorld />. But instead it still has its default content:
<p:presentation ...

What could be wrong?

/kind regards, Simon



--
View this message in context: 
http://apache-poi.1045710.n5.nabble.com/Modifying-ppt-presentation-xml-part-but-nothing-happens-tp5714775.html
Sent from the POI - User mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to