Office js 在OfficeJS中更改开放XML中的命名空间URI和存储ID

Office js 在OfficeJS中更改开放XML中的命名空间URI和存储ID,office-js,openxml,Office Js,Openxml,我是新来的公务员。我正在使用开放式XML 我已在所选位置插入了open xml,如 context.document.getSelection().insertOoxml(xml, 'Start'); 它创建了新的内容控件 现在我想获取该内容控件的xml,并更新namepspace URI和它的存储ID。但我没有找到任何API来实现这一点 我在下面试过了 const ooxml = contentControl.getOoxml(); await context.sync(); cons

我是新来的公务员。我正在使用开放式XML

我已在所选位置插入了open xml,如

context.document.getSelection().insertOoxml(xml, 'Start');
它创建了新的内容控件

现在我想获取该内容控件的xml,并更新namepspace URI和它的存储ID。但我没有找到任何API来实现这一点

我在下面试过了

 const ooxml = contentControl.getOoxml();
 await context.sync();
 const xmlDoc = new DOMParser().parseFromString(ooxml.value, "text/xml");
 let ele: any = xmlDoc.getElementsByTagName("w15:dataBinding")[0];
ele.setAttribute('w:storeItemID', newIDHere);
let xml = xmlDoc.documentElement.OuterHTML;
contentControl.insertOoxml(xml, 'Replace');
但在这里,新的内容控制被插入,而现有内容保持不变。因此,新内容控件的开放xml的“名称空间URI”和“storeITemID”发生了变化。但我希望它只用于现有的内容控制

在officeJS中有任何API可以做到这一点吗