Support for Custom XML in Presentations (C# .NET)

Good day,

Does the latest version of Aspose.Slides support Custom XMLs already? The latest thread I saw was March of last year and it seems its still not supported.

Here is the thread I saw:

Basically I need to remove Custom XMLs from presentations. These custom XMLs usually contain properties.

Thanks you.

Hi,

Thank you for showing interest in Aspose.Slides.

I have observed the thread link shared by you and regret to share that requested support for working with CustomXML parts inside presentation is presently unavailable in Aspose.Slides. I have linked this thread with issue SLIDESNET-36283 so that you may be automatically notified once the issue will be fixed. I have also requested our product team to share updated status about issue roadmap as well and will share that with you as soon as it will be shared by our product team.

Many Thanks,

Thanks for the quick reply.

The information about the issue roadmap will be greatly appreciated. Hope to know about it soon.

Thanks again.

Hi,

We will be glad to share further information with you as soon as it will be shared by our product team.

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.
(1)

@dcdeveloper,

We have introduced the support for managing CustomXML in Apsose.Slides and using that you can not only access the CustomXML data but can also add new or remove existing ones using simple API calls.

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

//Sample for clear all custom xml parts from presentation
using (Presentation pres = new Presentation("PresentationWithCustomXml.pptx"))
{
    foreach (ICustomXmlPart item in pres.AllCustomXmlParts)
    {
        item.Remove();
    }
    pres.Save("out.pptx", SaveFormat.Pptx);
}

The Property Aspose.Slides.ICustomData.CustomXmlParts has been introduced which represents a collection of custom xml parts associated with the corresponding ICustomData instance. You can add CustomXML data using following simple example.

using(Presentation pres = new Presentation())
{
    pres.Slides[0].CustomData.CustomXmlParts.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;
}