We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

CustomXml in Aspose.Slides (Java)

Hi,

Please look-up for "To add a custom XML part to a PowerPoint presentation" in a link -

https://msdn.microsoft.com/en-us/library/bb608612.aspx


Does Aspose have any support for accessing/adding/manipulating custom XML parts?


Thanks.

Hi,

I have observed the requirement shared by you and regret to share that at present Aspose.Slides does not support adding XML parts in presentation. I have created a new feature request with ID SLIDESJAVA-34776 in our issue tracking system to further investigate the possibility of implementing the requested support. This thread has been linked with the issue so that you may be automatically notified once the issue will be resolved.

Many Thanks,

The issues you have found earlier (filed as SLIDESNET-36283) have been fixed in this update.


This message was posted using Notification2Forum from Downloads module by Aspose Notifier.

The issues you have found earlier (filed as SLIDESJAVA-34776) have been fixed in this update.


This message was posted using Notification2Forum from Downloads module by Aspose Notifier.

@oraspose,

We now support manipulating the CustomXML using Aspose.Slides API. Now, you may add, access or remove the CustomXML inside a slide.

We have added CustomXmlParts that represents a collection of CustomXML parts associated with the corresponding ICustomData instance.

public static void AddCustomXML()
{
    Presentation pres = new Presentation();
    pres.getSlides().get_Item(0).getCustomData().getCustomXmlParts().add(GetXmlStringSample("John Doe")); //add new custom xml to slide custom data
    pres.save("out.pptx", SaveFormat.Pptx);
}

private static String GetXmlStringSample(String name)
{
    string xmlString =
        "<?xml version=\"1.0\" encoding=\"utf-8\"?>" +
        "<employees xmlns=\"http://schemas.test.com/sample\">" +
            "<employee>" +
                "<name>" + name + "</name>" +
            "</employee>" +
        "</employees>";
return xmlString;
} 

The following sample can be used to remove the CustomXML from slides.

public static void RemoveCustomXML()
{
    //Sample for clear all custom xml parts from presentation
    Presentation pres = new Presentation("PresentationWithCustomXml.pptx");
    for (ICustomXmlPart item : pres.getAllCustomXmlParts())
    {
        item.Remove();
    }
    pres.save("out.pptx", SaveFormat.Pptx);
}

Thank you Mudassir!

@oraspose,

We will keep you posted as soon as it will be fixed.