Our web application uses SharePoint to store documents. Documents received from SharePoint have embedded custom xml properties that reflect the library fields/columns for each library. For instance, we may have a CompanyID, ContractID, etc in the SharePoint library. When a new version of a file is checked into SharePoint it will look for these custom xml properties (if the document is docx/openxml) and use the values to update the document properties.
We have situations where the new version of a document may not have these custom properties. It may have been created from scratch, for instance. If you check in a document that has missing properties it will blank out these properties in the SharePoint library. I am trying to figure out how to use the CustomXmlPart API in Aspose to do the following:
Read through the custom xml "properties" to determine if the necessary fields are there. Update them with appropriate values if they exist. Add new properties to the collection if they do not. Doing this prior to checking the file in will insure the SharePoint record maintains its integrity.
So far I've been able to get the read part close to working.
Thanks much for any help. Some sample code would be awesome.