I want to extract the slide xml from the pptx files and replace the texts. I had done it for docx and xlsx with apache poi but poi has a very limited support for pptx. My first problem is, I cannot typecast org.pptx4j.pml.Sld to org.docx4j.wml.Document.
- Code: Select all
org.docx4j.openpackaging.parts.PresentationML.SlidePart slidePart = (SlidePart) allPartsMap.get(partName);
org.docx4j.wml.Document wmlDocument = (org.docx4j.wml.Document)slidePart.getJaxbElement();
// as
public final class SlidePart extends JaxbPmlPart<Sld>
I need the xml representation for marshalling and unmarshalling. The same operation is possible for documentPart
- Code: Select all
MainDocumentPart documentPart = wordMLPackage.getMainDocumentPart();
(org.docx4j.wml.Document) documentPart.getJaxbElement();
//as
public abstract class DocumentPart<E> extends JaxbXmlPart<E>
Why this difference is there in pptx4j and docx4j ?