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

Free Support Forum - aspose.com

Adding Sources to CustomXMLParts

Is there any Java Friendly way of adding Sources to the CustomXmlParts?

I want to add a source (ie Author, Website, Date Visited etc) to a document. The CustomXmlPart seems very sparse in functionality and only allows a byte array. I’ve added a source in a document and viewed the item1.xml file and the structure is fairly straight forward.

<b:InternetSiteTitle>Acme Corp</b:InternetSiteTitle>

There seems to be no API within Aspose Words to do this, so is the only alternative to do this using an XML Library, converting it to a byte array and then using the setData() method?

Best Regards,


Thanks for your inquiry. Yes, you understanding is correct. Please use Document.CustomXmlParts property to get or set the collection of Custom XML Data Storage Parts. You can use CustomXmlPart.Data property to get or set the XML content of this Custom XML Data Storage Part. There is no alternative way to set XML content to Custom XML Data Storage.

Please let us know if you have any more queries.