I'm using Javascript API for Office to get ooxml of parts of the document using Binding.getDataAsync. The result is that I have ooxml text which represent part of the document:
Now what I want is to alter this XML for example to put a table around the contents or to show a comment then save it back using Binding.getDataAsync. How can I use OpenOffice SDK to parse this xml to a document or a document part and do this processing?
I tried to use all the following:
var doc = new DocumentFormat.OpenXml.Wordprocessing.Document(ooxmlText);
//var part = new DocumentFormat.OpenXml.Wordprocessing.DocPart(ooxmlText);
//var parts = new DocumentFormat.OpenXml.Wordprocessing.DocParts(ooxmlText);
But I get back an error each time saying:
The XML has invalid content and cannot be constructed as an element.